[Issue 8149] New: Possible forward reference mistake
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 25 13:24:06 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8149
Summary: Possible forward reference mistake
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 2012-05-25 13:25:50 PDT ---
import std.algorithm: map;
auto foo() {
int spam(int) {
if (true) {
return 0;
} else {
[1].map!spam();
int this_is_a_mistake;
return 0;
}
}
return &spam;
}
void main() {}
DMD 2.060alpha gives:
test.d(8): Error: variable this_is_a_mistake forward referenced
test.d(7): Error: template instance test.foo.map!(spam).map!(int[]) error
instantiating
--
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