29 lines
669 B
Text
29 lines
669 B
Text
=== tests/cases/compiler/recursiveReturns.ts ===
|
|
function R1() {
|
|
>R1 : Symbol(R1, Decl(recursiveReturns.ts, 0, 0))
|
|
|
|
R1();
|
|
>R1 : Symbol(R1, Decl(recursiveReturns.ts, 0, 0))
|
|
|
|
return;
|
|
}
|
|
|
|
function R2() { R2(); }
|
|
>R2 : Symbol(R2, Decl(recursiveReturns.ts, 3, 1))
|
|
>R2 : Symbol(R2, Decl(recursiveReturns.ts, 3, 1))
|
|
|
|
function R3(n:number) {
|
|
>R3 : Symbol(R3, Decl(recursiveReturns.ts, 5, 23))
|
|
>n : Symbol(n, Decl(recursiveReturns.ts, 7, 12))
|
|
|
|
if (n == 0) {
|
|
>n : Symbol(n, Decl(recursiveReturns.ts, 7, 12))
|
|
|
|
//return;
|
|
}
|
|
else {
|
|
R3(n--);
|
|
>R3 : Symbol(R3, Decl(recursiveReturns.ts, 5, 23))
|
|
>n : Symbol(n, Decl(recursiveReturns.ts, 7, 12))
|
|
}
|
|
}
|