mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-14 09:25:02 +01:00
fix return values
This commit is contained in:
parent
eaa2f3527c
commit
b063850b53
8 changed files with 64 additions and 15 deletions
21
test.dil
21
test.dil
|
|
@ -1,12 +1,15 @@
|
|||
fn test() {
|
||||
let a = 5;
|
||||
fn cooler_add(a, b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
test();
|
||||
test();
|
||||
|
||||
let i = 0;
|
||||
while i < 100_000 {
|
||||
test();
|
||||
i = i + 1;
|
||||
fn add(a, b) {
|
||||
return cooler_add(a, b);
|
||||
}
|
||||
|
||||
let added = add(1, 5);
|
||||
|
||||
if added == 6 {
|
||||
print "correct";
|
||||
} else {
|
||||
print "FAILED";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue