Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Support generic aspect types (TypeAspect) #199

Open
WhitWaldo opened this issue Jul 31, 2023 · 2 comments
Open

Feature request: Support generic aspect types (TypeAspect) #199

WhitWaldo opened this issue Jul 31, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@WhitWaldo
Copy link

WhitWaldo commented Jul 31, 2023

I have a need to apply generic constraints to a type passed into an aspect. This is because the type is used in downstream methods which themselves have such constraints.

This means that it's not sufficient to support the user simply passing in a type an argument because constraints cannot be declared there. This led earlier to several dozen build errors indicating that the constraints were not met for the type passed into all manner of generic type arguments which made sense in retrospect.

Moreover, one cannot reference instance members of an aspect in a BuildEligibility today in a way that would at least ensure that the aspect wasn't applied to an ineligible type, but I have asked for this in a separate issue.

Please support this scenario as I'm not seeing a means of otherwise specifying these constraints on an arbitrary Type passed into an aspect and used downstream.

Thank you!

@PostSharpBot
Copy link
Member

Hello @WhitWaldo, thank you for submitting this issue. We will try to get back to you as soon as possible.
Note to the PostSharp team, this ticket is being tracked in our dashboard under ID TP-33605.

@gfraiteur
Copy link
Member

gfraiteur commented Aug 1, 2023

Well received. This is a complex endeavor so we are keeping that for all long-term backlog.

@gfraiteur gfraiteur added the enhancement New feature or request label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants