Lambdas + custom delegate types + type inference = breaking change in C# 10 #57916
Labels
Area-Compilers
Feature - Lambda Improvements
untriaged
Issues and PRs which have not yet been triaged by a lead
Version Used:
.NET 6.0 SDK RTM
Steps to Reproduce:
Compile the following code:
Expected Behavior:
This code compiles in C# 9.0/.NET 5.0 SDK, all invocations are bound to
AddRule<T>(Constant<T> constant, Func<T> factory)
overload. I expect the same behavior in C# 10/.NET 6.0 SDKActual Behavior:
Failed build in C# 10/.NET 6.0 SDK:
If I understand correctly, the compiler should prefer overloads that don't infer "function type" for the type arguments.
The text was updated successfully, but these errors were encountered: