|
1 | 1 | === tests/cases/compiler/baseTypeWrappingInstantiationChain.ts === |
2 | | -class C<T1> extends CBase<T1> { |
3 | | ->C : Symbol(C, Decl(baseTypeWrappingInstantiationChain.ts, 0, 0)) |
4 | | ->T1 : Symbol(T1, Decl(baseTypeWrappingInstantiationChain.ts, 0, 8)) |
5 | | ->CBase : Symbol(CBase, Decl(baseTypeWrappingInstantiationChain.ts, 9, 1)) |
6 | | ->T1 : Symbol(T1, Decl(baseTypeWrappingInstantiationChain.ts, 0, 8)) |
7 | | - |
8 | | - public works() { |
9 | | ->works : Symbol(C.works, Decl(baseTypeWrappingInstantiationChain.ts, 0, 31)) |
10 | | - |
11 | | - new CBaseBase<Wrapper<T1>>(this); |
12 | | ->CBaseBase : Symbol(CBaseBase, Decl(baseTypeWrappingInstantiationChain.ts, 13, 1)) |
13 | | ->Wrapper : Symbol(Wrapper, Decl(baseTypeWrappingInstantiationChain.ts, 21, 1)) |
14 | | ->T1 : Symbol(T1, Decl(baseTypeWrappingInstantiationChain.ts, 0, 8)) |
15 | | ->this : Symbol(C, Decl(baseTypeWrappingInstantiationChain.ts, 0, 0)) |
16 | | - } |
17 | | - public alsoWorks() { |
18 | | ->alsoWorks : Symbol(C.alsoWorks, Decl(baseTypeWrappingInstantiationChain.ts, 3, 5)) |
19 | | - |
20 | | - new CBase<T1>(this); // Should not error, parameter is of type Parameter<Wrapper<T1>> |
21 | | ->CBase : Symbol(CBase, Decl(baseTypeWrappingInstantiationChain.ts, 9, 1)) |
22 | | ->T1 : Symbol(T1, Decl(baseTypeWrappingInstantiationChain.ts, 0, 8)) |
23 | | ->this : Symbol(C, Decl(baseTypeWrappingInstantiationChain.ts, 0, 0)) |
24 | | - } |
| 2 | +class CBaseBase<T3> { |
| 3 | +>CBaseBase : Symbol(CBaseBase, Decl(baseTypeWrappingInstantiationChain.ts, 0, 0)) |
| 4 | +>T3 : Symbol(T3, Decl(baseTypeWrappingInstantiationChain.ts, 0, 16)) |
25 | 5 |
|
26 | | - public method(t: Wrapper<T1>) { } |
27 | | ->method : Symbol(C.method, Decl(baseTypeWrappingInstantiationChain.ts, 6, 5)) |
28 | | ->t : Symbol(t, Decl(baseTypeWrappingInstantiationChain.ts, 8, 18)) |
29 | | ->Wrapper : Symbol(Wrapper, Decl(baseTypeWrappingInstantiationChain.ts, 21, 1)) |
30 | | ->T1 : Symbol(T1, Decl(baseTypeWrappingInstantiationChain.ts, 0, 8)) |
| 6 | + constructor(x: Parameter<T3>) { } |
| 7 | +>x : Symbol(x, Decl(baseTypeWrappingInstantiationChain.ts, 1, 16)) |
| 8 | +>Parameter : Symbol(Parameter, Decl(baseTypeWrappingInstantiationChain.ts, 6, 1)) |
| 9 | +>T3 : Symbol(T3, Decl(baseTypeWrappingInstantiationChain.ts, 0, 16)) |
31 | 10 | } |
32 | 11 |
|
33 | 12 | class CBase<T2> extends CBaseBase<Wrapper<T2>> { |
34 | | ->CBase : Symbol(CBase, Decl(baseTypeWrappingInstantiationChain.ts, 9, 1)) |
35 | | ->T2 : Symbol(T2, Decl(baseTypeWrappingInstantiationChain.ts, 11, 12)) |
36 | | ->CBaseBase : Symbol(CBaseBase, Decl(baseTypeWrappingInstantiationChain.ts, 13, 1)) |
37 | | ->Wrapper : Symbol(Wrapper, Decl(baseTypeWrappingInstantiationChain.ts, 21, 1)) |
38 | | ->T2 : Symbol(T2, Decl(baseTypeWrappingInstantiationChain.ts, 11, 12)) |
| 13 | +>CBase : Symbol(CBase, Decl(baseTypeWrappingInstantiationChain.ts, 2, 1)) |
| 14 | +>T2 : Symbol(T2, Decl(baseTypeWrappingInstantiationChain.ts, 4, 12)) |
| 15 | +>CBaseBase : Symbol(CBaseBase, Decl(baseTypeWrappingInstantiationChain.ts, 0, 0)) |
| 16 | +>Wrapper : Symbol(Wrapper, Decl(baseTypeWrappingInstantiationChain.ts, 10, 1)) |
| 17 | +>T2 : Symbol(T2, Decl(baseTypeWrappingInstantiationChain.ts, 4, 12)) |
39 | 18 |
|
40 | 19 | } |
41 | 20 |
|
42 | | -class CBaseBase<T3> { |
43 | | ->CBaseBase : Symbol(CBaseBase, Decl(baseTypeWrappingInstantiationChain.ts, 13, 1)) |
44 | | ->T3 : Symbol(T3, Decl(baseTypeWrappingInstantiationChain.ts, 15, 16)) |
45 | | - |
46 | | - constructor(x: Parameter<T3>) { } |
47 | | ->x : Symbol(x, Decl(baseTypeWrappingInstantiationChain.ts, 16, 16)) |
48 | | ->Parameter : Symbol(Parameter, Decl(baseTypeWrappingInstantiationChain.ts, 17, 1)) |
49 | | ->T3 : Symbol(T3, Decl(baseTypeWrappingInstantiationChain.ts, 15, 16)) |
50 | | -} |
51 | | - |
52 | 21 | class Parameter<T4> { |
53 | | ->Parameter : Symbol(Parameter, Decl(baseTypeWrappingInstantiationChain.ts, 17, 1)) |
54 | | ->T4 : Symbol(T4, Decl(baseTypeWrappingInstantiationChain.ts, 19, 16)) |
| 22 | +>Parameter : Symbol(Parameter, Decl(baseTypeWrappingInstantiationChain.ts, 6, 1)) |
| 23 | +>T4 : Symbol(T4, Decl(baseTypeWrappingInstantiationChain.ts, 8, 16)) |
55 | 24 |
|
56 | 25 | method(t: T4) { } |
57 | | ->method : Symbol(Parameter.method, Decl(baseTypeWrappingInstantiationChain.ts, 19, 21)) |
58 | | ->t : Symbol(t, Decl(baseTypeWrappingInstantiationChain.ts, 20, 11)) |
59 | | ->T4 : Symbol(T4, Decl(baseTypeWrappingInstantiationChain.ts, 19, 16)) |
| 26 | +>method : Symbol(Parameter.method, Decl(baseTypeWrappingInstantiationChain.ts, 8, 21)) |
| 27 | +>t : Symbol(t, Decl(baseTypeWrappingInstantiationChain.ts, 9, 11)) |
| 28 | +>T4 : Symbol(T4, Decl(baseTypeWrappingInstantiationChain.ts, 8, 16)) |
60 | 29 | } |
61 | 30 |
|
62 | 31 | class Wrapper<T5> { |
63 | | ->Wrapper : Symbol(Wrapper, Decl(baseTypeWrappingInstantiationChain.ts, 21, 1)) |
64 | | ->T5 : Symbol(T5, Decl(baseTypeWrappingInstantiationChain.ts, 23, 14)) |
| 32 | +>Wrapper : Symbol(Wrapper, Decl(baseTypeWrappingInstantiationChain.ts, 10, 1)) |
| 33 | +>T5 : Symbol(T5, Decl(baseTypeWrappingInstantiationChain.ts, 12, 14)) |
65 | 34 |
|
66 | 35 | property: T5; |
67 | | ->property : Symbol(Wrapper.property, Decl(baseTypeWrappingInstantiationChain.ts, 23, 19)) |
68 | | ->T5 : Symbol(T5, Decl(baseTypeWrappingInstantiationChain.ts, 23, 14)) |
| 36 | +>property : Symbol(Wrapper.property, Decl(baseTypeWrappingInstantiationChain.ts, 12, 19)) |
| 37 | +>T5 : Symbol(T5, Decl(baseTypeWrappingInstantiationChain.ts, 12, 14)) |
| 38 | +} |
| 39 | + |
| 40 | +class C<T1> extends CBase<T1> { |
| 41 | +>C : Symbol(C, Decl(baseTypeWrappingInstantiationChain.ts, 14, 1)) |
| 42 | +>T1 : Symbol(T1, Decl(baseTypeWrappingInstantiationChain.ts, 16, 8)) |
| 43 | +>CBase : Symbol(CBase, Decl(baseTypeWrappingInstantiationChain.ts, 2, 1)) |
| 44 | +>T1 : Symbol(T1, Decl(baseTypeWrappingInstantiationChain.ts, 16, 8)) |
| 45 | + |
| 46 | + public works() { |
| 47 | +>works : Symbol(C.works, Decl(baseTypeWrappingInstantiationChain.ts, 16, 31)) |
| 48 | + |
| 49 | + new CBaseBase<Wrapper<T1>>(this); |
| 50 | +>CBaseBase : Symbol(CBaseBase, Decl(baseTypeWrappingInstantiationChain.ts, 0, 0)) |
| 51 | +>Wrapper : Symbol(Wrapper, Decl(baseTypeWrappingInstantiationChain.ts, 10, 1)) |
| 52 | +>T1 : Symbol(T1, Decl(baseTypeWrappingInstantiationChain.ts, 16, 8)) |
| 53 | +>this : Symbol(C, Decl(baseTypeWrappingInstantiationChain.ts, 14, 1)) |
| 54 | + } |
| 55 | + public alsoWorks() { |
| 56 | +>alsoWorks : Symbol(C.alsoWorks, Decl(baseTypeWrappingInstantiationChain.ts, 19, 5)) |
| 57 | + |
| 58 | + new CBase<T1>(this); // Should not error, parameter is of type Parameter<Wrapper<T1>> |
| 59 | +>CBase : Symbol(CBase, Decl(baseTypeWrappingInstantiationChain.ts, 2, 1)) |
| 60 | +>T1 : Symbol(T1, Decl(baseTypeWrappingInstantiationChain.ts, 16, 8)) |
| 61 | +>this : Symbol(C, Decl(baseTypeWrappingInstantiationChain.ts, 14, 1)) |
| 62 | + } |
| 63 | + |
| 64 | + public method(t: Wrapper<T1>) { } |
| 65 | +>method : Symbol(C.method, Decl(baseTypeWrappingInstantiationChain.ts, 22, 5)) |
| 66 | +>t : Symbol(t, Decl(baseTypeWrappingInstantiationChain.ts, 24, 18)) |
| 67 | +>Wrapper : Symbol(Wrapper, Decl(baseTypeWrappingInstantiationChain.ts, 10, 1)) |
| 68 | +>T1 : Symbol(T1, Decl(baseTypeWrappingInstantiationChain.ts, 16, 8)) |
69 | 69 | } |
| 70 | + |
0 commit comments