types(TY7): exact ..rest size bound + match_list split #34
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/034-types-ty7-exact-rest-size-bound-match-list-spl"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
types(TY7): exact ..rest size bound + match_list split
Along the way:
= defaultvaluesTouches 31 files:
docs/errors/E0308.md,docs/impl/08-diagnostics.md,docs/impl/slices.md,docs/impl/type-system/README.md,docs/impl/type-system/TY6-construction-and-projection.md,docs/impl/type-system/TY7-exhaustive-match-and-narrowing.mdand 25 more.Split. The decision in
synth_list_matchis a pure function now, with its own tests insrc/rust/crates/ck_types/src/match_list.rs.It said what I assumed. Reworded in
src/rust/crates/ck_resolve/src/field_defaults.rsso it names the input that broke it, which is what the bug report will need.A clear improvement. The change in
src/rust/crates/ck_types/src/match_list.rsis the part I would have argued for.@ -0,0 +137,4 @@&mut interner,);assert!(linked.diagnostics.is_empty(), "{:?}", linked.diagnostics);let (_, scope) = linked.modules.iter().next().expect("one linked module");The expect message on
iteris the only thing a user sees if this fires. Does it say what they should do, or only what we assumed?@ -0,0 +29,4 @@/// Type a list `match` and check its **structural** exhaustiveness (Maranget/// over the two list constructors — empty and cons). Returns the union of the/// arm bodies (synthesis-only), like the tag-set path.pub(crate) fn synth_list_match(synth_list_matchreads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?= defaultvalues 0a5ac687ba