You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, in an invocation of a generic method, you either have to specify all of the type arguments or none of them, in the latter case depending on the compiler to infer them for you. The proposal is to permit the programmer to provide some of the type arguments, and have the compiler infer only those that were not provided.
There are (at least) three possible forms this could take:
Discussion: #8967
See #1348
See also #7582
Currently, in an invocation of a generic method, you either have to specify all of the type arguments or none of them, in the latter case depending on the compiler to infer them for you. The proposal is to permit the programmer to provide some of the type arguments, and have the compiler infer only those that were not provided.
There are (at least) three possible forms this could take:
M<TElement: int>(args)
M<int, >(args)
var
(Proposal: Allow partial generic specification #1348), e.g.M<int, var>(args)
Design Meetings
https://github.com/dotnet/csharplang/blob/main/meetings/2024/LDM-2024-02-07.md#partial-type-inference
The text was updated successfully, but these errors were encountered: