ruff/crates/red_knot_python_semantic
Dhruv Manilawala 2629527559
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.
2024-10-30 19:13:57 +00:00
..
resources Fix panic when filling up types vector during unpacking (#14006) 2024-10-30 19:13:57 +00:00
src Fix panic when filling up types vector during unpacking (#14006) 2024-10-30 19:13:57 +00:00
tests [red-knot] Cleanup generated names of mdtest tests (#13831) 2024-10-20 15:11:53 +00:00
build.rs Modernize build scripts (#13837) 2024-10-20 22:35:35 +01:00
Cargo.toml [red-knot] Cleanup generated names of mdtest tests (#13831) 2024-10-20 15:11:53 +00:00