2014-07-13 01:04:16 +02:00
|
|
|
class C {
|
|
|
|
y: I;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface I {
|
|
|
|
x(): Goo;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Goo {
|
|
|
|
p: string;
|
|
|
|
}
|
2017-02-25 02:48:06 +01:00
|
|
|
|
|
|
|
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 {}
|