Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/ice20056.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice20056.d(19): Error: calling non-static function `iter` requires an instance of type `RangeWrapper`
5 ---
6 */
7 struct Def(alias fn)
8 {
9 alias func = alias_selector!(fn).VOverloads[0];
10 }
11
12 template alias_selector(alias fn)
13 {
14 alias VOverloads = __traits(getOverloads, __traits(parent, fn), __traits(identifier, fn));
15 }
16
17 void init_rangewrapper()
18 {
19 Def!(RangeWrapper.iter).func;
20 }
21
22 struct RangeWrapper
23 {
24 void iter() { }
25 }