34 lines
431 B
Text
34 lines
431 B
Text
=== tests/cases/compiler/recursiveReturns.ts ===
|
|
function R1() {
|
|
>R1 : typeof R1
|
|
|
|
R1();
|
|
>R1() : void
|
|
>R1 : typeof R1
|
|
|
|
return;
|
|
}
|
|
|
|
function R2() { R2(); }
|
|
>R2 : typeof R2
|
|
>R2() : void
|
|
>R2 : typeof R2
|
|
|
|
function R3(n:number) {
|
|
>R3 : typeof R3
|
|
>n : number
|
|
|
|
if (n == 0) {
|
|
>n == 0 : boolean
|
|
>n : number
|
|
|
|
//return;
|
|
}
|
|
else {
|
|
R3(n--);
|
|
>R3(n--) : void
|
|
>R3 : typeof R3
|
|
>n-- : number
|
|
>n : number
|
|
}
|
|
}
|