TypeScript/tests/cases/compiler/infinitelyExpandingTypes2.ts

16 lines
216 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
interface Foo<T> {
x: Foo<Foo<T>>;
}
interface Bar<T> extends Foo<T> {
y: string;
}
function f(p: Foo<number>) {
console.log(p);
}
var v: Bar<number> = null;
f(v); // should not error