TypeScript/tests/baselines/reference/genericCallWithFixedArguments.types

24 lines
1 KiB
Text
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/genericCallWithFixedArguments.ts ===
class A { foo() { } }
2015-04-13 23:01:57 +02:00
>A : A, Symbol(A, Decl(genericCallWithFixedArguments.ts, 0, 0))
>foo : () => void, Symbol(foo, Decl(genericCallWithFixedArguments.ts, 0, 9))
2014-08-15 23:33:16 +02:00
class B { bar() { }}
2015-04-13 23:01:57 +02:00
>B : B, Symbol(B, Decl(genericCallWithFixedArguments.ts, 0, 21))
>bar : () => void, Symbol(bar, Decl(genericCallWithFixedArguments.ts, 1, 9))
2014-08-15 23:33:16 +02:00
function g<T, U>(x) { }
2015-04-13 23:01:57 +02:00
>g : <T, U>(x: any) => void, Symbol(g, Decl(genericCallWithFixedArguments.ts, 1, 20))
>T : T, Symbol(T, Decl(genericCallWithFixedArguments.ts, 3, 11))
>U : U, Symbol(U, Decl(genericCallWithFixedArguments.ts, 3, 13))
>x : any, Symbol(x, Decl(genericCallWithFixedArguments.ts, 3, 17))
2014-08-15 23:33:16 +02:00
g<A, B>(7) // the parameter list is fixed, so this should not error
>g<A, B>(7) : void
2015-04-13 23:01:57 +02:00
>g : <T, U>(x: any) => void, Symbol(g, Decl(genericCallWithFixedArguments.ts, 1, 20))
>A : A, Symbol(A, Decl(genericCallWithFixedArguments.ts, 0, 0))
>B : B, Symbol(B, Decl(genericCallWithFixedArguments.ts, 0, 21))
2015-04-13 21:36:11 +02:00
>7 : number
2014-08-15 23:33:16 +02:00