2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/infinitelyExpandingTypes2.ts (1 errors) ====
|
|
|
|
interface Foo<T> {
|
|
|
|
x: Foo<Foo<T>>;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Bar<T> extends Foo<T> {
|
|
|
|
y: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
function f(p: Foo<number>) {
|
|
|
|
console.log(p);
|
|
|
|
~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'console'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var v: Bar<number> = null;
|
|
|
|
|
|
|
|
f(v); // should not error
|
|
|
|
|