http://d.puremagic.com/issues/show_bug.cgi?id=4449
Summary: ICE(glue.c) on failed type inference against associative array Product: D Version: 2.041 Platform: x86 OS/Version: All Status: NEW Keywords: ice-on-invalid-code Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: rsi...@gmail.com --- Comment #0 from Shin Fujishiro <rsi...@gmail.com> 2010-07-12 13:14:52 PDT --- DMD (r576) aborts with assertion failure if type inference against an associative array fails with a struct/union argument. -------------------- test.d template Test(T : V[K], K, V) {} struct S {} enum pred = __traits(compiles, Test!S); -------------------- % dmd -c test Assertion failed: (0), function totym, file glue.c, line 1056. -------------------- The abort does not occur if the template argument is not a struct. -------------------- template Test(T : V[K], K, V) {} enum pred = __traits(compiles, Test!int); -------------------- The abort does not occur if the infered type is not an associative array. -------------------- template Test(T : V[], V) {} struct S{} enum pred = __traits(compiles, Test!S); -------------------- The abort does not occur if the failure is not gagged. -------------------- template Test(T : V[K], K, V) {} struct S {} alias Test!S X; -------------------- % dmd -c test test.d(1): Error: cannot create associative array V[K] test.d(3): Error: template instance Test!(S) does not match template declaration Test(T : V[K],K,V) -------------------- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------