mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
23 lines
373 B
Plaintext
23 lines
373 B
Plaintext
********** source program **********
|
|
fn f Int: x -> Int {
|
|
if ((x == 0))
|
|
return x;
|
|
else
|
|
return f(0 = (x - 1));
|
|
|
|
}
|
|
fn main () -> Int {
|
|
return f(0 = 2);
|
|
|
|
}
|
|
********** type checking **********
|
|
--- step exp Int --->
|
|
--- step exp Int --->
|
|
--- step exp Int --->
|
|
--- step exp Int --->
|
|
--- step exp Int --->
|
|
9: type error in call
|
|
expected: Int
|
|
actual: Tuple(0 = Int)
|
|
EXIT CODE: 255
|