Using immutable values as template parameter hangs dmd

simendsjo simen.endsjo at pandavre.com
Sun Jun 26 07:10:04 PDT 2011


This is probably not a minimal test case, but it's as far as I got. 
Don't know what the actual bug is, so I'd be grateful if someone else 
could help explain it so I can add it to Bugzilla with a better subject.

This is using DMD 2.053 on win7.

struct S(int N) {
     immutable SN = N;
     // Using N instead, and the compiler doesn't hang
     // It doesn't have anything to do with alias. The same occurs in 
method templates etc.
     alias S!SN T;
}

void main() {
     S!(4) s;
}


More information about the Digitalmars-d-learn mailing list