Comment #0 by erikas.aubade — 2017-12-02T08:23:30Z
This testcase causes an ICE for me on every version of DMD since 2.073.0 on both Windows and Linux
class A {
B!string[2] names() {
return [null, null];
};
}
class B(T, size_t idx = 0) {
}
class C {
}
template Testing(T) {
private B!string[] var;
static if (__traits(compiles, var = T.init.names)) {
enum Testing = true;
} else {
enum Testing = false;
}
}
void main() {
assert (Testing!A);
assert (!Testing!C);
}