gcc/testsuite/gdc.test/compilable/test22676.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=22676 |
| 2 | template fullyQualifiedName(T) |
| 3 | { |
| 4 | static if (is(T : real)) |
| 5 | enum fullyQualifiedName; |
| 6 | |
| 7 | enum fullyQualifiedName = null; |
| 8 | } |
| 9 | |
| 10 | static auto _inst() |
| 11 | { |
| 12 | return fullyQualifiedName!(frop); |
| 13 | } |
| 14 | |
| 15 | alias attr = __traits(getAttributes, _inst); |
| 16 | |
| 17 | class frop |
| 18 | { |
| 19 | alias type_id = registry!frop; |
| 20 | } |
| 21 | |
| 22 | template registry(T) |
| 23 | { |
| 24 | enum string FOO = fullyQualifiedName!T; |
| 25 | } |