-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix conditional returns messing up nested branches.
Bug: issue #890 Test: new test
- Loading branch information
Showing
6 changed files
with
62 additions
and
1 deletion.
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
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 @@ | ||
hi |
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,18 @@ | ||
#include <shell> | ||
|
||
public void main() | ||
{ | ||
if (1) | ||
{ | ||
if (0) | ||
{ | ||
return; | ||
} | ||
|
||
print("hi\n"); | ||
} | ||
else | ||
{ | ||
print("this should never happen\n"); | ||
} | ||
} |
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 @@ | ||
hi |
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,30 @@ | ||
#include <shell> | ||
|
||
public void main() | ||
{ | ||
switch (0) | ||
{ | ||
case 0: | ||
{ | ||
if (0) | ||
{ | ||
return; | ||
} | ||
|
||
print("hi\n"); | ||
} | ||
case 1: | ||
{ | ||
if (0) | ||
{ | ||
return; | ||
} | ||
|
||
print("this should never happen\n"); | ||
} | ||
default: | ||
{ | ||
print("this should never happen either\n"); | ||
} | ||
} | ||
} |