-
-
Notifications
You must be signed in to change notification settings - Fork 805
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix loop variable typing (#3571)
there is an inconsistency between codegen and typechecking types when a loop iterates over a literal list. in this code, although it compiles, during typechecking, `i` is typed as a `uint8` while `[1,2,3]` is annotated with `int8[3]` ``` @external def foo(): for i in [1,2,3]: a: uint8 = i ``` since the iterator type is always correct, this commit is a chore since it fixes the discrepancy, but there is no known way to "abuse" the behavior to get a wrong codegen type. chainsec june 2023 review 5.15
- Loading branch information
1 parent
158099b
commit c28f14f
Showing
2 changed files
with
5 additions
and
7 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