2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/generics3.ts ===
|
|
|
|
class C<T> { private x: T; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>C : C<T>, Symbol(C, Decl(generics3.ts, 0, 0))
|
|
|
|
>T : T, Symbol(T, Decl(generics3.ts, 0, 8))
|
|
|
|
>x : T, Symbol(x, Decl(generics3.ts, 0, 12))
|
|
|
|
>T : T, Symbol(T, Decl(generics3.ts, 0, 8))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
interface X { f(): string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>X : X, Symbol(X, Decl(generics3.ts, 0, 28))
|
|
|
|
>f : () => string, Symbol(f, Decl(generics3.ts, 1, 13))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
interface Y { f(): string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>Y : Y, Symbol(Y, Decl(generics3.ts, 1, 28))
|
|
|
|
>f : () => string, Symbol(f, Decl(generics3.ts, 2, 13))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var a: C<X>;
|
2015-04-13 23:01:57 +02:00
|
|
|
>a : C<X>, Symbol(a, Decl(generics3.ts, 3, 3))
|
|
|
|
>C : C<T>, Symbol(C, Decl(generics3.ts, 0, 0))
|
|
|
|
>X : X, Symbol(X, Decl(generics3.ts, 0, 28))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var b: C<Y>;
|
2015-04-13 23:01:57 +02:00
|
|
|
>b : C<Y>, Symbol(b, Decl(generics3.ts, 4, 3))
|
|
|
|
>C : C<T>, Symbol(C, Decl(generics3.ts, 0, 0))
|
|
|
|
>Y : Y, Symbol(Y, Decl(generics3.ts, 1, 28))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
a = b; // Ok - should be identical
|
|
|
|
>a = b : C<Y>
|
2015-04-13 23:01:57 +02:00
|
|
|
>a : C<X>, Symbol(a, Decl(generics3.ts, 3, 3))
|
|
|
|
>b : C<Y>, Symbol(b, Decl(generics3.ts, 4, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|