-
-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow lists of any type as loop variable #2616
Conversation
14df721
to
a2ea1e8
Compare
Codecov Report
@@ Coverage Diff @@
## master #2616 +/- ##
==========================================
- Coverage 86.66% 86.53% -0.13%
==========================================
Files 91 92 +1
Lines 9433 9457 +24
Branches 2359 2369 +10
==========================================
+ Hits 8175 8184 +9
- Misses 773 781 +8
- Partials 485 492 +7
Continue to review full report at Codecov.
|
# override with type inferred at typechecking time | ||
subtype = BaseType(self.stmt.target._metadata["type"]._id) | ||
iter_list.typ.subtype = subtype | ||
target_type = new_type_to_old_type(self.stmt.target._metadata["type"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: investigate why target type != iter.subtype
* allow arbitrary types in loop lists * fix lint * fix mypy * add a test * fix loop target inference * prune some now-invalid tests * fix lint * add a note to revisit type checker * add a nested static array test
* allow arbitrary types in loop lists * fix lint * fix mypy * add a test * fix loop target inference * prune some now-invalid tests * fix lint * add a note to revisit type checker * add a nested static array test
What I did
allow lists of any type as loop variable
How I did it
added a function
new_type_to_old_type
so that we can use the results of the type checker directly. eventually this can replace the oldparse_type
function.How to verify it
Description for the changelog
Cute Animal Picture