forked from MiguelMarcelino/py2many
-
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.
Preliminary fix for MiguelMarcelino#36
- Loading branch information
1 parent
926fefe
commit a779c84
Showing
3 changed files
with
31 additions
and
5 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
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,12 @@ | ||
|
||
def test(): | ||
# The definition of a depends on the for loop's range | ||
# Therefore, the propagated static type should not be | ||
# int, but Optional[int] (Union[int, None]) | ||
# PyJL's fix_scope_bounds flag should propagate the type | ||
# and generate the expected code | ||
for i in range(1): | ||
a = 2 | ||
print(a*"aa") | ||
|
||
test() |