Skip to content

Commit ba44e9d

Browse files
authored
[red-knot] Don't use separate ID types for each alist (#16415)
Regardless of whether #16408 and #16311 pan out, this part is worth pulling out as a separate PR. Before, you had to define a new `IndexVec` index type for each type of association list you wanted to create. Now there's a single index type that's internal to the alist implementation, and you use `List<K, V>` to store a handle to a particular list. This also adds some property tests for the alist implementation.
1 parent fdf0915 commit ba44e9d

File tree

7 files changed

+768
-790
lines changed

7 files changed

+768
-790
lines changed

.github/workflows/daily_property_tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
run: |
4848
export QUICKCHECK_TESTS=100000
4949
for _ in {1..5}; do
50+
cargo test --locked --release --package red_knot_python_semantic -- --ignored list::property_tests
5051
cargo test --locked --release --package red_knot_python_semantic -- --ignored types::property_tests::stable
5152
done
5253

crates/red_knot_python_semantic/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pub use semantic_model::{HasType, SemanticModel};
1414
pub mod ast_node_ref;
1515
mod db;
1616
pub mod lint;
17+
pub(crate) mod list;
1718
mod module_name;
1819
mod module_resolver;
1920
mod node_key;

0 commit comments

Comments
 (0)