[Issue 9831] New: Error message with failed lambda inference
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 29 11:45:41 PDT 2013
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 at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-03-29 11:45:40 PDT ---
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: -------
More information about the Digitalmars-d-bugs
mailing list