TypeScript/tests/cases/compiler/typeArgumentInferenceOrdering.ts
2014-07-12 17:30:19 -07:00

15 lines
229 B
TypeScript

function foo<T>(f: { y: T }): T { return null }
var x = foo(new C()).x; // was Error that property x does not exist on type {}
class C {
y: I;
}
interface I {
x(): Goo;
}
interface Goo {
p: string;
}