2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/genericClasses0.ts ===
|
|
|
|
class C<T> {
|
|
|
|
>C : C<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
public x: T;
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
var v1 : C<string>;
|
|
|
|
>v1 : C<string>
|
2014-08-19 04:56:03 +02:00
|
|
|
>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
|
|
|
|
|