[Issue 11316] New: Some cases of missing delegate argument type inference
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 21 11:26:23 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11316
Summary: Some cases of missing delegate argument type inference
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-10-21 11:26:22 PDT ---
void main() {
void delegate(const int x) F0;
F0 = (const int x) {}; // OK
F0 = (x) {}; // OK
void delegate(in int x) F1;
F1 = (in int x) {}; // OK
F1 = (x) {}; // OK
void delegate(ref int x) F2;
F2 = (ref int x) {}; // OK
F2 = (x) {}; // Error
void delegate(out int x) F3;
F3 = (out int x) {}; // OK
F3 = (x) {}; // Error
}
dmd 2.064beta2 gives:
test.d(10): Error: cannot implicitly convert expression (__lambda6) of type
void delegate(int x) pure nothrow @safe to void delegate(ref int x)
test.d(13): Error: cannot implicitly convert expression (__lambda8) of type
void delegate(int x) pure nothrow @safe to void delegate(out int x)
--
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