http://d.puremagic.com/issues/show_bug.cgi?id=5079
Summary: [ICE on invalid code] '0' on line 1103 in file
'glue.c' on undefined symbol during CTFE
Product: D
Version: unspecified
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Rob Jacques <[email protected]> 2010-10-18 20:53:50 PDT ---
//import std.conv; // the forgotten import
string nthLabel(int n) {
return "__Global_"~ to!string(n);
}
template getGlobal(string file = __FILE__, int line = __LINE__, int N = 0) {
static if( !__traits(compiles, mixin(nthLabel(N)) ) )
int getGlobal = N;
else
int getGlobal = getGlobal!(file,line, N+1 );
}
enum Foo = getGlobal!(__FILE__, __LINE__) ;
Assertion failure: '0' on line 1103 in file 'glue.c' when std.conv not imported
Comment out enum Foo and the correct error message appears:
template instance template 'to' is not defined, did you mean n?
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------