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: Method type-parameter-list inference #6114

Closed
alrz opened this issue Oct 17, 2015 · 4 comments
Closed

Proposal: Method type-parameter-list inference #6114

alrz opened this issue Oct 17, 2015 · 4 comments
Labels
Area-Language Design Resolution-Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on.

Comments

@alrz
Copy link
Contributor

alrz commented Oct 17, 2015

Considering #1042, #1470, #2114, #2319, #4423, #5168, #5429 and others, there is a strong demand for a more powerful type inference in C#. Although, this one is missing:

public TResult F<>(T arg) {}

Compiler would infer types that are not in the scope as type parameters in order of args first and then the return type.

This also can be extended to use in delegates and record type declarations.

public struct ValueTuple<>(T1 item1,T2 item2);
public delegate void Action<>(TArg1,TArg2); // using #6115
@HaloFour
Copy link

Typos turning into generic type parameters? No thanks.

@gafter gafter added the Resolution-Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on. label Oct 18, 2015
@alrz
Copy link
Contributor Author

alrz commented Oct 18, 2015

@HaloFour this could be addressed by forcing TName convention but currently there is no such behavior in the language.

@alrz alrz closed this as completed Oct 18, 2015
@paulomorgado
Copy link

+1 @HaloFour

@alrz
Copy link
Contributor Author

alrz commented Oct 18, 2015

@paulomorgado come on, this is already closed :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Language Design Resolution-Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on.
Projects
None yet
Development

No branches or pull requests

5 participants