53 lines
614 B
Text
53 lines
614 B
Text
|
=== tests/cases/compiler/recursiveMods.ts ===
|
||
|
export module Foo {
|
||
|
>Foo : typeof Foo
|
||
|
|
||
|
export class C {}
|
||
|
>C : C
|
||
|
}
|
||
|
|
||
|
export module Foo {
|
||
|
>Foo : typeof Foo
|
||
|
|
||
|
function Bar() : C {
|
||
|
>Bar : () => C
|
||
|
>C : C
|
||
|
|
||
|
if (true) { return Bar();}
|
||
|
>Bar() : C
|
||
|
>Bar : () => C
|
||
|
|
||
|
return new C();
|
||
|
>new C() : C
|
||
|
>C : typeof C
|
||
|
}
|
||
|
|
||
|
function Baz() : C {
|
||
|
>Baz : () => C
|
||
|
>C : C
|
||
|
|
||
|
var c = Baz();
|
||
|
>c : C
|
||
|
>Baz() : C
|
||
|
>Baz : () => C
|
||
|
|
||
|
return Bar();
|
||
|
>Bar() : C
|
||
|
>Bar : () => C
|
||
|
}
|
||
|
|
||
|
function Gar() {
|
||
|
>Gar : () => void
|
||
|
|
||
|
var c : C = Baz();
|
||
|
>c : C
|
||
|
>C : C
|
||
|
>Baz() : C
|
||
|
>Baz : () => C
|
||
|
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|