]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/ice13024.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / ice13024.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice13024.d(15): Error: cannot implicitly convert expression `t.x` of type `A` to `B`
5 ---
6 */
7
8 enum A { a }
9 enum B { b }
10 struct T { A x; B y; }
11 void main()
12 {
13 T t;
14 auto r1 = [cast(int)(t.x), cast(int)(t.y)]; // OK
15 auto r3 = [t.x, t.y]; // crash
16 }