digitalmars.D.bugs - [Issue 9831] New: Error message with failed lambda inference
- d-bugmail puremagic.com (27/27) Mar 29 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9831
http://d.puremagic.com/issues/show_bug.cgi?id=9831 Summary: Error message with failed lambda inference Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: minor Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc void main() { immutable int c; int function(int x) func; func = x => c; } DMD 2.063alpha gives the error: temp.d(4): Error: cannot infer function literal type from int function(int x) But I expect an error similar to other cases of unfit lambdas, similar to: test.d(4): Error: cannot implicitly convert expression (__lambda1) of type int delegate(int) nothrow pure safe to int function(int). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 29 2013