Don't append return to void procedures

This commit is contained in:
2025-01-13 11:55:19 +01:00
parent b45b00a3f6
commit 3bd4c3af6f
7 changed files with 138 additions and 46 deletions

View File

@@ -79,17 +79,30 @@ begin
end;
proc test_if();
var y: Bool;
var x: Bool, y: Bool;
begin
x := true;
y := false;
writei("");
if y then
if x and y then
writei("Test if: True")
else
writei("Test if: False")
end;
proc test_not();
var x: Bool;
begin
x := false;
writei("");
if not x then
writei("Test not true.")
else
writei("Test not false")
end;
begin
test_primitive();
test_string();
@@ -97,5 +110,6 @@ begin
test_pointer();
test_record();
test_const();
test_if()
test_if();
test_not()
end.