TypeScript/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.types

29 lines
491 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/privacyCheckOnTypeParameterReferenceInConstructorParameter.ts ===
export class A<T1>{
>A : A<T1>
>T1 : T1
2014-08-15 23:33:16 +02:00
constructor(callback: (self: A<T1>) => void) {
>callback : (self: A<T1>) => void
>self : A<T1>
>A : A<T1>
>T1 : T1
2014-08-15 23:33:16 +02:00
var child = new B(this);
>child : B<A<T1>>
2014-08-15 23:33:16 +02:00
>new B(this) : B<A<T1>>
>B : typeof B
>this : A<T1>
2014-08-15 23:33:16 +02:00
}
}
export class B<T2> {
>B : B<T2>
>T2 : T2
2014-08-15 23:33:16 +02:00
constructor(parent: T2) { }
>parent : T2
>T2 : T2
2014-08-15 23:33:16 +02:00
}