Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/test8509.d(13): Error: cannot implicitly convert expression `"hello world"` of type `string` to `E`
5 fail_compilation/test8509.d(14): Error: cannot implicitly convert expression `"hello world"` of type `string` to `E`
6 ---
7 */
8 module test8509;
9 enum E : string { a = "hello", b = "world" }
10
11 void main()
12 {
13 E e1 = E.a ~ " world";
14 E e2 = "hello " ~ E.b;
15 }