| 1 |
// https://issues.dlang.org/show_bug.cgi?id=24065 |
| 2 |
|
| 3 |
/* |
| 4 |
TEST_OUTPUT: |
| 5 |
--- |
| 6 |
fail_compilation/test24065.d(12): Error: string expected as argument of __traits `getTargetInfo` instead of `int` |
| 7 |
fail_compilation/test24065.d(15): Error: string expected as argument of __traits `getTargetInfo` instead of `foo` |
| 8 |
fail_compilation/test24065.d(18): Error: string expected as argument of __traits `getTargetInfo` instead of `e` |
| 9 |
--- |
| 10 |
*/ |
| 11 |
|
| 12 |
auto s1 = __traits(getTargetInfo, int); |
| 13 |
|
| 14 |
void foo() {} |
| 15 |
auto s2 = __traits(getTargetInfo, foo); |
| 16 |
|
| 17 |
enum e; |
| 18 |
auto s3 = __traits(getTargetInfo, e); |