31 lines
389 B
Text
31 lines
389 B
Text
|
=== tests/cases/compiler/generics3.ts ===
|
||
|
class C<T> { private x: T; }
|
||
|
>C : C<T>
|
||
|
>T : T
|
||
|
>x : T
|
||
|
>T : T
|
||
|
|
||
|
interface X { f(): string; }
|
||
|
>X : X
|
||
|
>f : () => string
|
||
|
|
||
|
interface Y { f(): string; }
|
||
|
>Y : Y
|
||
|
>f : () => string
|
||
|
|
||
|
var a: C<X>;
|
||
|
>a : C<X>
|
||
|
>C : C
|
||
|
>X : X
|
||
|
|
||
|
var b: C<Y>;
|
||
|
>b : C<Y>
|
||
|
>C : C
|
||
|
>Y : Y
|
||
|
|
||
|
a = b; // Ok - should be identical
|
||
|
>a = b : C<Y>
|
||
|
>a : C<X>
|
||
|
>b : C<Y>
|
||
|
|