-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix panic when filling up types vector during unpacking (#14006)
## Summary This PR fixes a panic which can occur in an unpack assignment when: * (number of target expressions) - (number of tuple types) > 2 * There's a starred expression The reason being that the `insert` panics because the index is greater than the length. This is an error case and so practically it should occur very rarely. The solution is to resize the types vector to match the number of expressions and then insert the starred expression type. ## Test Plan Add a new test case.
- Loading branch information
1 parent
bf20061
commit 2629527
Showing
2 changed files
with
17 additions
and
0 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