Consider the code below. For reasons I would like to find out, the C # compiler was unable to conclude that the Map function returns type A with an explicit type specification when using the lambda expression.
Any reasons or documentation links for such a case explaining the behavior?
class Program { public class A { } public static A Map(dynamic x) { return new A(); } static void Main(string[] args) { IEnumerable<dynamic> d = new dynamic[] { };
source share