20 lines
590 B
Text
20 lines
590 B
Text
=== tests/cases/compiler/generics0.ts ===
|
|
interface G<T> {
|
|
>G : Symbol(G, Decl(generics0.ts, 0, 0))
|
|
>T : Symbol(T, Decl(generics0.ts, 0, 12))
|
|
|
|
x: T;
|
|
>x : Symbol(G.x, Decl(generics0.ts, 0, 16))
|
|
>T : Symbol(T, Decl(generics0.ts, 0, 12))
|
|
}
|
|
|
|
var v2: G<string>;
|
|
>v2 : Symbol(v2, Decl(generics0.ts, 4, 3))
|
|
>G : Symbol(G, Decl(generics0.ts, 0, 0))
|
|
|
|
var z = v2.x; // 'y' should be of type 'string'
|
|
>z : Symbol(z, Decl(generics0.ts, 6, 3))
|
|
>v2.x : Symbol(G.x, Decl(generics0.ts, 0, 16))
|
|
>v2 : Symbol(v2, Decl(generics0.ts, 4, 3))
|
|
>x : Symbol(G.x, Decl(generics0.ts, 0, 16))
|
|
|