-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Checking of starred expressions #483
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
54530ee
Created star expression parser test. For both isolated expressions an…
spkersten 9f4b75e
Added parsing of star expressions
spkersten 450b33d
Added semanal tests for star expressions
spkersten 81198b9
Added semantic analysis of starred expression
spkersten 6c12493
Rudimentary type checking of star expr: Added check for nr lvalues vs…
spkersten e506530
Type checking of assignment to starred expressions
spkersten ce7f0c0
Whitespace fixes
spkersten ccc9275
Added semanal tests for starred expressions in for-stmt and generator…
spkersten 9986cef
Changed index of for-stmt and generator expressions to be a single no…
spkersten aac826f
Added type inference tests for starred expressions in assignment targets
spkersten 504a5a2
Refactorred duplicate code
spkersten b168128
Removed explicite check for parenthesis from parsing of index variabl…
spkersten 047d955
Added StarType, parsing of it, and check that only a single star type…
spkersten 5938c92
Parse and semanal tests for star type annotations. Fixes missing line…
spkersten f698d5a
Added semanal check for starred type annotations
spkersten 7b8ba4e
Added type check test for annotated starred expressions.
spkersten f9eb240
Added documentation for starred types
spkersten File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This fails in case of nested star expressions, like
a, *(b, *c) = x
. I'd like to fix it, but I have trouble coming up with a test case for type inference from lvalues.I guess it is not very common, though, and not very useful.