Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/nestedtempl3.d(23): Error: cannot access frame pointer of `nestedtempl3.test.S!(i).S`
5 ---
6 */
7
8 void test()
9 {
10 int i;
11
12 auto f0()
13 {
14 int j = 10;
15 struct S(alias a)
16 {
17 auto get() { return j; }
18 }
19 return S!i();
20 }
21
22 alias S = typeof(f0());
23 auto s = S();
24 }