TypeScript/tests/cases/compiler/recursiveMods.ts

26 lines
329 B
TypeScript
Raw Normal View History

// @allowUnreachableCode: true
// @module: commonjs
2014-07-13 01:04:16 +02:00
export module Foo {
export class C {}
}
export module Foo {
function Bar() : C {
if (true) { return Bar();}
return new C();
}
function Baz() : C {
var c = Baz();
return Bar();
}
function Gar() {
var c : C = Baz();
return;
}
}