1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-15 04:32:21 +00:00
ton/tolk-tester/tests/invalid-declaration-12.tolk

17 lines
296 B
Text
Raw Normal View History

fun proxy(x: int) {
return factorial(x);
}
fun factorial(x: int) {
if (x <= 0) {
return 1;
}
return x * proxy(x-1);
}
/**
@compilation_should_fail
@stderr could not infer return type of `factorial`, because it appears in a recursive call chain
@stderr fun factorial
*/