Debian Codegraph @

gcc/testsuite/gdc.test/compilable/test22254.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=22254
2
3 struct Template(T) { T t; }
4
5 Template!Bar a;
6 Template!Bar b;
7
8 immutable struct Bar { }
9
10 static assert(is(typeof(a) == typeof(b)));
11 static assert(is(typeof(a) == Template!(immutable Bar)));
12
13 Template!C c1;
14 Template!C c2;
15
16 immutable class C { }
17
18 static assert(is(typeof(c1) == typeof(c2)));
19 static assert(is(typeof(c1) == Template!(immutable C)));