TypeScript/tests/baselines/reference/genericClasses0.types

21 lines
269 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/genericClasses0.ts ===
class C<T> {
>C : C<T>
>T : T
2014-08-15 23:33:16 +02:00
public x: T;
>x : T
>T : T
2014-08-15 23:33:16 +02:00
}
var v1 : C<string>;
>v1 : C<string>
>C : C<T>
2014-08-15 23:33:16 +02:00
var y = v1.x; // should be 'string'
>y : string
>v1.x : string
>v1 : C<string>
>x : string
2014-08-15 23:33:16 +02:00