summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/fail15755.d
blob: 8fd2b51b60aa8eb3e5b81e8d1c16d246ed26f4b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
TEST_OUTPUT:
---
fail_compilation/fail15755.d(28): Error: `tuple(123)` has no effect
---
*/

// https://issues.dlang.org/show_bug.cgi?id=15755

struct Foo
{
    @(123)
    int a;
}

template Attributes(As...)
{
    alias Attributes = As;
}

template getattribute(alias member, alias attrs = Attributes!(__traits(getAttributes, member)))
{
    alias getattribute = attrs;
}

void main()
{
    getattribute!(__traits(getMember, Foo, "a"));
}