gcc/testsuite/gdc.test/compilable/test19081.d
raw| 1 | void main() { |
| 2 | @(1) enum { A } |
| 3 | /// comment |
| 4 | @(1) enum X { A } |
| 5 | @(2) enum Y; |
| 6 | @(1) @(2) enum Z { A } |
| 7 | |
| 8 | struct Test { int test; } |
| 9 | @Test(1) enum W { A } |
| 10 | @(1) enum V: int { A } |
| 11 | X a; |
| 12 | static assert(__traits(getAttributes, X).length == 1); |
| 13 | static assert(__traits(getAttributes, X)[0] == 1); |
| 14 | } |