diff options
| author | Baitinq <[email protected]> | 2025-03-09 09:52:54 +0100 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-03-09 09:52:54 +0100 |
| commit | 21432e8965403975a3f8e9175a46430b7b818241 (patch) | |
| tree | 32780c229213c6df29f68cbd90dbe1c5de7a5895 /examples/10.src | |
| parent | Feature: Add support for mod operator (diff) | |
| download | interpreter-21432e8965403975a3f8e9175a46430b7b818241.tar.gz interpreter-21432e8965403975a3f8e9175a46430b7b818241.tar.bz2 interpreter-21432e8965403975a3f8e9175a46430b7b818241.zip | |
Codegen: Fix bug with if statements inside while loops
Diffstat (limited to '')
| -rw-r--r-- | examples/10.src | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/10.src b/examples/10.src index b840849..59f91e1 100644 --- a/examples/10.src +++ b/examples/10.src @@ -6,9 +6,11 @@ let main = () => i64 { counter = counter + 1; }; - while counter % 3 == 0 { - print(0); + while true { + if counter == 10 { + return counter; + }; }; - return counter; + return 1; }; |