2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/genericStaticAnyTypeFunction.ts ===
|
|
|
|
class A {
|
2015-04-13 23:01:57 +02:00
|
|
|
>A : A, Symbol(A, Decl(genericStaticAnyTypeFunction.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
static one<T>(source: T, value: number): T {
|
2015-04-13 23:01:57 +02:00
|
|
|
>one : <T>(source: T, value: number) => T, Symbol(A.one, Decl(genericStaticAnyTypeFunction.ts, 0, 9))
|
|
|
|
>T : T, Symbol(T, Decl(genericStaticAnyTypeFunction.ts, 2, 15))
|
|
|
|
>source : T, Symbol(source, Decl(genericStaticAnyTypeFunction.ts, 2, 18))
|
|
|
|
>T : T, Symbol(T, Decl(genericStaticAnyTypeFunction.ts, 2, 15))
|
|
|
|
>value : number, Symbol(value, Decl(genericStaticAnyTypeFunction.ts, 2, 28))
|
|
|
|
>T : T, Symbol(T, Decl(genericStaticAnyTypeFunction.ts, 2, 15))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return source;
|
2015-04-13 23:01:57 +02:00
|
|
|
>source : T, Symbol(source, Decl(genericStaticAnyTypeFunction.ts, 2, 18))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
static goo() { return 0; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>goo : () => number, Symbol(A.goo, Decl(genericStaticAnyTypeFunction.ts, 6, 5))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
static two<T>(source: T): T {
|
2015-04-13 23:01:57 +02:00
|
|
|
>two : <T>(source: T) => T, Symbol(A.two, Decl(genericStaticAnyTypeFunction.ts, 7, 30))
|
|
|
|
>T : T, Symbol(T, Decl(genericStaticAnyTypeFunction.ts, 9, 15))
|
|
|
|
>source : T, Symbol(source, Decl(genericStaticAnyTypeFunction.ts, 9, 18))
|
|
|
|
>T : T, Symbol(T, Decl(genericStaticAnyTypeFunction.ts, 9, 15))
|
|
|
|
>T : T, Symbol(T, Decl(genericStaticAnyTypeFunction.ts, 9, 15))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return this.one<T>(source, 42); // should not error
|
|
|
|
>this.one<T>(source, 42) : T
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.one : <T>(source: T, value: number) => T, Symbol(A.one, Decl(genericStaticAnyTypeFunction.ts, 0, 9))
|
|
|
|
>this : typeof A, Symbol(A, Decl(genericStaticAnyTypeFunction.ts, 0, 0))
|
|
|
|
>one : <T>(source: T, value: number) => T, Symbol(A.one, Decl(genericStaticAnyTypeFunction.ts, 0, 9))
|
|
|
|
>T : T, Symbol(T, Decl(genericStaticAnyTypeFunction.ts, 9, 15))
|
|
|
|
>source : T, Symbol(source, Decl(genericStaticAnyTypeFunction.ts, 9, 18))
|
2015-04-13 21:36:11 +02:00
|
|
|
>42 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|