forked from gbdev/rgbds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not evaluate an untaken ELIF's condition
Fixes gbdev#764
- Loading branch information
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
if 1 | ||
println "taken if" | ||
elif 2 / 0 ; avoided fatal "Division by zero" error | ||
println "untaken elif" | ||
elif 3 / 0 ; avoided fatal "Division by zero" error | ||
println "untaken after untaken" | ||
endc | ||
|
||
if 0 | ||
println "untaken if" | ||
elif 1 | ||
println "taken elif" | ||
elif !@#$ ; avoided fatal syntax error | ||
println "untaken elif" | ||
elif %^&* ; avoided fatal syntax error | ||
println "untaken after untaken" | ||
endc | ||
|
||
if 0 | ||
println "untaken if" | ||
elif 1 / 0 ; fatal "Division by zero" error | ||
println "unreached elif" | ||
endc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FATAL: elif-after-taken-if.asm(21): | ||
Division by zero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
taken if | ||
taken elif |