| 1 |
/+ |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail24224.d(19): Error: struct / class type expected as argument to __traits(initSymbol) instead of `ES` |
| 5 |
fail_compilation/fail24224.d(20): Error: struct / class type expected as argument to __traits(initSymbol) instead of `EU` |
| 6 |
fail_compilation/fail24224.d(21): Error: struct / class type expected as argument to __traits(initSymbol) instead of `EC` |
| 7 |
--- |
| 8 |
+/ |
| 9 |
struct S {} |
| 10 |
union U {} |
| 11 |
class C {} |
| 12 |
|
| 13 |
enum ES : S { a = S.init } |
| 14 |
enum EU : U { a = U.init } |
| 15 |
enum EC : C { a = C.init } |
| 16 |
|
| 17 |
void test() |
| 18 |
{ |
| 19 |
auto init1 = __traits(initSymbol, ES); |
| 20 |
auto init2 = __traits(initSymbol, EU); |
| 21 |
auto init3 = __traits(initSymbol, EC); |
| 22 |
} |