Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ctfe14731.d(16): Error: cannot implicitly convert expression `split("a b")` of type `string[]` to `string`
5 fail_compilation/ctfe14731.d(17): Error: cannot implicitly convert expression `split("a b")` of type `string[]` to `string`
6 ---
7 */
8
9 string[] split(string a)
10 {
11 return [a];
12 }
13
14 void main()
15 {
16 enum string list1 = "a b".split();
17 string list2 = "a b".split();
18 }