Debian Codegraph @

gcc/testsuite/gdc.dg/pr124026.d

raw
1 // { dg-do compile }
2 struct UDA
3 {
4 int delegate() foo;
5 }
6
7 static UDA getUDA(alias S)()
8 {
9 return __traits(getAttributes, S)[0];
10 }
11
12 struct S124026
13 {
14 @UDA({ return 42; }) int a;
15 }
16
17 void f124026()
18 {
19 S124026 m;
20 enum uda = getUDA!(m.a);
21 }