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

[Proposal] Generic aliases #3309

Closed
VBAndCs opened this issue Mar 25, 2020 · 5 comments
Closed

[Proposal] Generic aliases #3309

VBAndCs opened this issue Mar 25, 2020 · 5 comments

Comments

@VBAndCs
Copy link

VBAndCs commented Mar 25, 2020

Allow defining generic aliases:
Currently, we can't mark an alias as generic:

using Expr<T> = Expression<Func<T, object>>;

So, Expr can be used in generic classes like this:

class Foo<T>
{
   public List<Expr<T>> Includes { get; } 
       = new List<Expr<T>>( );
}

Which is a little longer than #3306 but still readable, with the benefit that it is usable in all classes in the file.

@YairHalberstadt
Copy link
Contributor

@VBAndCs

For future reference, adding a link to your issue on every single related issue is generally considered spam.

@YairHalberstadt
Copy link
Contributor

Also this is a duplicate of #1239.
Please close and move discussion to there.

@CyrusNajmabadi
Copy link
Member

Dupe. Closing out.

@CyrusNajmabadi
Copy link
Member

For future reference, adding a link to your issue on every single related issue is generally considered spam.

Indeed. Please avoid that in the future @VBAndCs. Thanks!

@VBAndCs
Copy link
Author

VBAndCs commented Mar 25, 2020

OK.
Hope you accept #1239.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants