Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/fail3731.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail3731.d(13): Error: cannot implicitly convert expression `x` of type `immutable(D)` to `fail3731.main.C`
5 ---
6 */
7
8 void main()
9 {
10 class C {}
11 class D : C {}
12 auto x = new immutable(D);
13 C y = x;
14 }