Debian Codegraph @

gcc/testsuite/gdc.test/compilable/test23617.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=23617
2
3 struct S
4 {
5 void foo() {}
6 }
7
8 struct Wrapper
9 {
10 size_t currentIndex;
11 S[] arrayOfS;
12
13 auto opDispatch(string name, T ...)(T t)
14 {
15 return __traits(child, arrayOfS[this.currentIndex], __traits(getMember, S, name))(t);
16 }
17 }
18
19 void main()
20 {
21 Wrapper w;
22 w.opDispatch!"foo"();
23 }