Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/nestedtempl0.d(18): Error: class `nestedtempl0.K.D!(1, B!(a)).D` doesn't need a frame pointer, but super class `B` needs the frame pointer of `main`
5 fail_compilation/nestedtempl0.d(28): Error: template instance `nestedtempl0.K.D!(1, B!(a))` error instantiating
6 fail_compilation/nestedtempl0.d(18): Error: class `nestedtempl0.main.fun.D!(b, B!(a)).D` needs the frame pointer of `fun`, but super class `B` needs the frame pointer of `main`
7 fail_compilation/nestedtempl0.d(33): Error: template instance `nestedtempl0.main.fun.D!(b, B!(a))` error instantiating
8 ---
9 */
10
11 class K
12 {
13 class B(alias a)
14 {
15
16 }
17
18 class D(alias a, T) : T
19 {
20
21 }
22 }
23
24 void main()
25 {
26 int a;
27 auto k = new K;
28 auto d = k.new K.D!(1, K.B!a);
29
30 auto fun()
31 {
32 int b;
33 auto o = k.new K.D!(b, K.B!a);
34 }
35 }