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