// satisfaction of a constraint to Function, no errors expected function foo string>(x: T): T { return x; } interface I { (): string; } var i: I; class C { foo: string; } var a: { (): string }; var b: { new (): string }; var c: { (): string; (x): string }; var r1 = foo((x) => x); var r2 = foo((x: string) => x); var r3 = foo(function (x) { return x }); var r4 = foo(function (x: string) { return x }); var r5 = foo(i); var r8 = foo(c); interface I2 { (x: T): T; } var i2: I2; class C2 { foo: T; } var a2: { (x: T): T }; var b2: { new (x: T): T }; var c2: { (x: T): T; (x: T, y: T): T }; var r9 = foo(function (x: U) { return x; }); var r10 = foo((x: U) => x); var r12 = foo(i2); var r15 = foo(c2);