| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/ice14844.d(21): Error: in expression `__traits(allMembers, opDispatch)` template `opDispatch(string name)` has no members |
| 5 |
fail_compilation/ice14844.d(21): `opDispatch(string name)` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation |
| 6 |
--- |
| 7 |
*/ |
| 8 |
|
| 9 |
struct Typedef |
| 10 |
{ |
| 11 |
template opDispatch(string name) |
| 12 |
{ |
| 13 |
static if (true) |
| 14 |
{ |
| 15 |
} |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
void runUnitTestsImpl() |
| 20 |
{ |
| 21 |
foreach (x; __traits(allMembers, Typedef.opDispatch)) |
| 22 |
{ |
| 23 |
} |
| 24 |
} |