71 lines
1.3 KiB
Text
71 lines
1.3 KiB
Text
=== tests/cases/compiler/baseTypeWrappingInstantiationChain.ts ===
|
|
class C<T1> extends CBase<T1> {
|
|
>C : C<T1>
|
|
>T1 : T1
|
|
>CBase : CBase<T1>
|
|
>T1 : T1
|
|
|
|
public works() {
|
|
>works : () => void
|
|
|
|
new CBaseBase<Wrapper<T1>>(this);
|
|
>new CBaseBase<Wrapper<T1>>(this) : CBaseBase<Wrapper<T1>>
|
|
>CBaseBase : typeof CBaseBase
|
|
>Wrapper : Wrapper<T5>
|
|
>T1 : T1
|
|
>this : C<T1>
|
|
}
|
|
public alsoWorks() {
|
|
>alsoWorks : () => void
|
|
|
|
new CBase<T1>(this); // Should not error, parameter is of type Parameter<Wrapper<T1>>
|
|
>new CBase<T1>(this) : CBase<T1>
|
|
>CBase : typeof CBase
|
|
>T1 : T1
|
|
>this : C<T1>
|
|
}
|
|
|
|
public method(t: Wrapper<T1>) { }
|
|
>method : (t: Wrapper<T1>) => void
|
|
>t : Wrapper<T1>
|
|
>Wrapper : Wrapper<T5>
|
|
>T1 : T1
|
|
}
|
|
|
|
class CBase<T2> extends CBaseBase<Wrapper<T2>> {
|
|
>CBase : CBase<T2>
|
|
>T2 : T2
|
|
>CBaseBase : CBaseBase<Wrapper<T2>>
|
|
>Wrapper : Wrapper<T5>
|
|
>T2 : T2
|
|
|
|
}
|
|
|
|
class CBaseBase<T3> {
|
|
>CBaseBase : CBaseBase<T3>
|
|
>T3 : T3
|
|
|
|
constructor(x: Parameter<T3>) { }
|
|
>x : Parameter<T3>
|
|
>Parameter : Parameter<T4>
|
|
>T3 : T3
|
|
}
|
|
|
|
class Parameter<T4> {
|
|
>Parameter : Parameter<T4>
|
|
>T4 : T4
|
|
|
|
method(t: T4) { }
|
|
>method : (t: T4) => void
|
|
>t : T4
|
|
>T4 : T4
|
|
}
|
|
|
|
class Wrapper<T5> {
|
|
>Wrapper : Wrapper<T5>
|
|
>T5 : T5
|
|
|
|
property: T5;
|
|
>property : T5
|
|
>T5 : T5
|
|
}
|