[Issue 2085] New: CTFE fails if the function is forward referenced
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 9 05:02:43 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2085
Summary: CTFE fails if the function is forward referenced
Product: D
Version: 1.029
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: samukha at voliacable.com
Related to 2080.
----
const s = foo();
pragma(msg, s);
char[] foo()
{
return "Hi from foo";
}
----
Error: cannot evaluate ... you know :)
Worked around by placing s declaration and pragma after foo definition
--
More information about the Digitalmars-d-bugs
mailing list