//arrayTest.d template I(T ...) { alias I = T; } auto sumArrs(T0, T1)(T0[] a, T1[] b) { a[] += b[]; //no ICE without this line return a; } pragma(msg, __traits(compiles, sumArrs(I!(string[], string).init))); $dmd arrayTest.d false Statement::toCBuffer() Internal error: s2ir.c 135 This is a very heavy reduced test-case from a much larger program. The original __traits(compiles, ...) was in a static if, not a pragma(msg, ...)
https://github.com/D-Programming-Language/dmd/pull/2706
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/38a4d2e7e7514e8e2cacaf3dd4393b914e5563d2 fix Issue 11376 - ICE on __traits(compiles, ...) with invalid array-op https://github.com/D-Programming-Language/dmd/commit/864fcda2b9635b5d24c6ef55813f4c2575984744 Merge pull request #2706 from 9rnsr/fix11376 Issue 11376 - ICE on __traits(compiles, ...) with invalid array-op
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1558c334e345ee8031d95ab4bf42550b11353414 More better fix for issue 11376