2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/genericInterfaceTypeCall.ts ===
|
|
|
|
interface Foo<T> {
|
2015-04-13 22:54:22 +02:00
|
|
|
>Foo : Foo<T>, Symbol(Foo,Decl(genericInterfaceTypeCall.ts,0,0))
|
|
|
|
>T : T, Symbol(T,Decl(genericInterfaceTypeCall.ts,0,14))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
reject(arg: T): void;
|
2015-04-13 22:54:22 +02:00
|
|
|
>reject : (arg: T) => void, Symbol(reject,Decl(genericInterfaceTypeCall.ts,0,18))
|
|
|
|
>arg : T, Symbol(arg,Decl(genericInterfaceTypeCall.ts,1,11))
|
|
|
|
>T : T, Symbol(T,Decl(genericInterfaceTypeCall.ts,0,14))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
var foo: Foo<string>
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : Foo<string>, Symbol(foo,Decl(genericInterfaceTypeCall.ts,3,3))
|
|
|
|
>Foo : Foo<T>, Symbol(Foo,Decl(genericInterfaceTypeCall.ts,0,0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
interface bar<T> {
|
2015-04-13 22:54:22 +02:00
|
|
|
>bar : bar<T>, Symbol(bar,Decl(genericInterfaceTypeCall.ts,3,20))
|
|
|
|
>T : T, Symbol(T,Decl(genericInterfaceTypeCall.ts,5,14))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
fail(func: (arg: T) => void ): void;
|
2015-04-13 22:54:22 +02:00
|
|
|
>fail : (func: (arg: T) => void) => void, Symbol(fail,Decl(genericInterfaceTypeCall.ts,5,18))
|
|
|
|
>func : (arg: T) => void, Symbol(func,Decl(genericInterfaceTypeCall.ts,6,9))
|
|
|
|
>arg : T, Symbol(arg,Decl(genericInterfaceTypeCall.ts,6,16))
|
|
|
|
>T : T, Symbol(T,Decl(genericInterfaceTypeCall.ts,5,14))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
fail2(func2: { (arg: T): void; }): void;
|
2015-04-13 22:54:22 +02:00
|
|
|
>fail2 : (func2: (arg: T) => void) => void, Symbol(fail2,Decl(genericInterfaceTypeCall.ts,6,40))
|
|
|
|
>func2 : (arg: T) => void, Symbol(func2,Decl(genericInterfaceTypeCall.ts,7,10))
|
|
|
|
>arg : T, Symbol(arg,Decl(genericInterfaceTypeCall.ts,7,20))
|
|
|
|
>T : T, Symbol(T,Decl(genericInterfaceTypeCall.ts,5,14))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
var test: bar<string>;
|
2015-04-13 22:54:22 +02:00
|
|
|
>test : bar<string>, Symbol(test,Decl(genericInterfaceTypeCall.ts,9,3))
|
|
|
|
>bar : bar<T>, Symbol(bar,Decl(genericInterfaceTypeCall.ts,3,20))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
test.fail(arg => foo.reject(arg));
|
|
|
|
>test.fail(arg => foo.reject(arg)) : void
|
2015-04-13 22:54:22 +02:00
|
|
|
>test.fail : (func: (arg: string) => void) => void, Symbol(bar.fail,Decl(genericInterfaceTypeCall.ts,5,18))
|
|
|
|
>test : bar<string>, Symbol(test,Decl(genericInterfaceTypeCall.ts,9,3))
|
|
|
|
>fail : (func: (arg: string) => void) => void, Symbol(bar.fail,Decl(genericInterfaceTypeCall.ts,5,18))
|
2014-08-15 23:33:16 +02:00
|
|
|
>arg => foo.reject(arg) : (arg: string) => void
|
2015-04-13 22:54:22 +02:00
|
|
|
>arg : string, Symbol(arg,Decl(genericInterfaceTypeCall.ts,11,10))
|
2014-08-15 23:33:16 +02:00
|
|
|
>foo.reject(arg) : void
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo.reject : (arg: string) => void, Symbol(Foo.reject,Decl(genericInterfaceTypeCall.ts,0,18))
|
|
|
|
>foo : Foo<string>, Symbol(foo,Decl(genericInterfaceTypeCall.ts,3,3))
|
|
|
|
>reject : (arg: string) => void, Symbol(Foo.reject,Decl(genericInterfaceTypeCall.ts,0,18))
|
|
|
|
>arg : string, Symbol(arg,Decl(genericInterfaceTypeCall.ts,11,10))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
test.fail2(arg => foo.reject(arg)); // Error: Supplied parameters do not match any signature of call target
|
|
|
|
>test.fail2(arg => foo.reject(arg)) : void
|
2015-04-13 22:54:22 +02:00
|
|
|
>test.fail2 : (func2: (arg: string) => void) => void, Symbol(bar.fail2,Decl(genericInterfaceTypeCall.ts,6,40))
|
|
|
|
>test : bar<string>, Symbol(test,Decl(genericInterfaceTypeCall.ts,9,3))
|
|
|
|
>fail2 : (func2: (arg: string) => void) => void, Symbol(bar.fail2,Decl(genericInterfaceTypeCall.ts,6,40))
|
2014-08-15 23:33:16 +02:00
|
|
|
>arg => foo.reject(arg) : (arg: string) => void
|
2015-04-13 22:54:22 +02:00
|
|
|
>arg : string, Symbol(arg,Decl(genericInterfaceTypeCall.ts,12,11))
|
2014-08-15 23:33:16 +02:00
|
|
|
>foo.reject(arg) : void
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo.reject : (arg: string) => void, Symbol(Foo.reject,Decl(genericInterfaceTypeCall.ts,0,18))
|
|
|
|
>foo : Foo<string>, Symbol(foo,Decl(genericInterfaceTypeCall.ts,3,3))
|
|
|
|
>reject : (arg: string) => void, Symbol(Foo.reject,Decl(genericInterfaceTypeCall.ts,0,18))
|
|
|
|
>arg : string, Symbol(arg,Decl(genericInterfaceTypeCall.ts,12,11))
|
2014-08-15 23:33:16 +02:00
|
|
|
|