peon/tests/calls.pn

23 lines
295 B
Plaintext
Raw Normal View History

# Tests simple calls
import std;
2022-06-14 22:45:41 +02:00
fn noReturn(n: int) {
var n = n;
var `17` = 17;
print(n == n); # true
print(`17` == 17); # true
2022-06-14 22:45:41 +02:00
return;
}
fn fooBar(a, b: int): int {
var baz = 38;
print(baz == 38);
2022-06-14 22:45:41 +02:00
return a;
}
noReturn(1);
2022-12-01 22:04:10 +01:00
print(fooBar(1, 3) == 1); # true