2014-07-13 01:04:16 +02:00
|
|
|
//// [mutrec.ts]
|
|
|
|
interface A {
|
|
|
|
x:B[];
|
|
|
|
}
|
|
|
|
|
|
|
|
interface B {
|
|
|
|
x:A[];
|
|
|
|
}
|
|
|
|
|
|
|
|
function f(p: A) { return p };
|
|
|
|
var b:B;
|
|
|
|
f(b);
|
|
|
|
|
|
|
|
interface I1 {
|
|
|
|
y:I2;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface I2 {
|
|
|
|
y:I3;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface I3 {
|
|
|
|
y:I1;
|
|
|
|
}
|
|
|
|
|
|
|
|
function g(p: I1) { return p };
|
|
|
|
var i2:I2;
|
|
|
|
g(i2);
|
|
|
|
var i3:I3;
|
|
|
|
g(i3);
|
|
|
|
|
|
|
|
interface I4 {
|
|
|
|
y:I5;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface I5 {
|
|
|
|
y:I4;
|
|
|
|
}
|
|
|
|
|
|
|
|
var i4:I4;
|
|
|
|
g(i4);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// [mutrec.js]
|
2015-02-07 05:03:24 +01:00
|
|
|
function f(p) { return p; }
|
2014-07-13 01:04:16 +02:00
|
|
|
;
|
|
|
|
var b;
|
|
|
|
f(b);
|
2015-02-07 05:03:24 +01:00
|
|
|
function g(p) { return p; }
|
2014-07-13 01:04:16 +02:00
|
|
|
;
|
|
|
|
var i2;
|
|
|
|
g(i2);
|
|
|
|
var i3;
|
|
|
|
g(i3);
|
|
|
|
var i4;
|
|
|
|
g(i4);
|