-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TVMScript] Use new variable frame in If/Then/Else (#14250)
Previously, while TVMScript introduces a new scope for other contexts (e.g. `for`, `while`, `with`, etc), the `if` and `else` blocks did not introduce a new scope. This caused erroneous parsing errors if the `if` and `else` blocks each contained a variable with the same name. Added a `self.var_table.with_frame()` context resolves this issue.
- Loading branch information
1 parent
3b274aa
commit 3f56a95
Showing
2 changed files
with
18 additions
and
2 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