Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/b17285.d(15): Error: type `ONE` has no value
5 fail_compilation/b17285.d(15): perhaps use `ONE.init`
6 fail_compilation/b17285.d(15): Error: type `TWO` has no value
7 fail_compilation/b17285.d(15): Error: cannot implicitly convert expression `ONE` of type `b17285.ONE` to `int`
8 ---
9 */
10
11 class ONE {}
12 enum TWO;
13
14 void foo() {
15 foreach(key; [ONE, TWO, 1]) {}
16 }