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

--- Comment #0 from Rob Jacques <> 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;
        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:
------- You are receiving this mail because: -------

Reply via email to