2014-08-15 23:33:16 +02:00
|
|
|
=== 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>
|
2014-08-19 04:56:03 +02:00
|
|
|
>C : C<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>X : X
|
|
|
|
|
|
|
|
var b: C<Y>;
|
|
|
|
>b : C<Y>
|
2014-08-19 04:56:03 +02:00
|
|
|
>C : C<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>Y : Y
|
|
|
|
|
|
|
|
a = b; // Ok - should be identical
|
|
|
|
>a = b : C<Y>
|
|
|
|
>a : C<X>
|
|
|
|
>b : C<Y>
|
|
|
|
|