2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/genericBaseClassLiteralProperty.ts ===
|
|
|
|
class BaseClass<T> {
|
|
|
|
>BaseClass : BaseClass<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
public _getValue1: { (): T; };
|
|
|
|
>_getValue1 : () => T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
public _getValue2: () => T;
|
|
|
|
>_getValue2 : () => T
|
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
class SubClass extends BaseClass<number> {
|
|
|
|
>SubClass : SubClass
|
2014-08-19 04:56:03 +02:00
|
|
|
>BaseClass : BaseClass<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
public Error(): void {
|
|
|
|
>Error : () => void
|
|
|
|
|
|
|
|
var x : number = this._getValue1();
|
|
|
|
>x : number
|
|
|
|
>this._getValue1() : number
|
|
|
|
>this._getValue1 : () => number
|
|
|
|
>this : SubClass
|
|
|
|
>_getValue1 : () => number
|
|
|
|
|
|
|
|
var y : number = this._getValue2();
|
|
|
|
>y : number
|
|
|
|
>this._getValue2() : number
|
|
|
|
>this._getValue2 : () => number
|
|
|
|
>this : SubClass
|
|
|
|
>_getValue2 : () => number
|
|
|
|
}
|
|
|
|
}
|