Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag13142.d(25): Error: cannot implicitly convert expression `3` of type `int` to `TYPE`
5 ---
6 */
7
8 class Button
9 {
10 enum TYPE // button type
11 {
12 COMMAND,
13 CHECK,
14 OPTION,
15 }
16 }
17
18 class Toolbar
19 {
20 enum ButtonTYPE // button type
21 {
22 COMMAND = Button.TYPE.COMMAND,
23 CHECK = Button.TYPE.CHECK,
24 OPTION = Button.TYPE.OPTION,
25 DELIMETER = Button.TYPE.max + 1
26 }
27 }