Result: done Files: crates/nikaia-std/src/tools/{check_boxes,check_core_flow,check_kinds,check_places,emit_core_match,emit_items}.nika + their lowered/.rs, crates/nikaia/tests/it/error_sums.rs, tests/compiler/tests/a_catch_names_a_struct_error_by_its_name., a_catch_names_each_of_two_struct_errors., a_catch_names_a_library_error_by_its_path., a_catch_naming_a_type_that_cannot_arrive_is_refused., regex_a_bad_pattern_is_a_regex_error.nika Commit: a888b15 check, emit: a match error naming a type whole covers it, and naming every type is complete (ADR-357 D1, D5, #673); 699ba57 tests: the regex bad-pattern test catches regex::Error by its path, without its wrapper (#673) Body: a bare type name or type path over error takes that member; lowered as _ in that member’s half; complete without else when every arriving type is named (else still needed for ?/open from(p) sets); a complete sum match lowers with no catch-all; a type named whole that cannot arrive is NK1103 (existing code, new sentence); library variant paths (io::IoError::NotFound) now count in the closed-set check Fixes: none Pushed: no, by the brief Tests: tests/compiler –both-settings 219/219; unfixed compiler: library_error_by_its_path, each_of_two_struct_errors, type_that_cannot_arrive, regex rewrite FAILED there; a_catch_names_a_struct_error_by_its_name passed unfixed (one type, only a rustc snake-case warning on stderr, as the brief’s probe B said); it: guard set + error_sums catch_ match_* several_errors refusals typecheck and the other NK1151/NK1103 modules, 704 passed; error_sums::a_match_over_two_error_types_needs_an_else rewritten to ADR-357 (renamed …_names_what_it_misses: names the missing IoError variants, no longer asks for else) Gate: green Deviation: the brief’s “keep today’s refusal” for a type that cannot arrive: today there was none (a bare Worse was a binding, accepted); now NK1103 with its existing message form. Commits by hand, not scripts/commit.nika (it pushes). Found: (1) lowering defect: let mut taken = 0 used only as home.contains(taken) (home: Vec[i64]) lowers as i32, rustc E0271 <i32 as AsKey>::Q == i64 reaches the user; probe: fn main(){ let home: Vec[i64] = [0, 2]; let mut taken = 0; if !home.contains(taken) { println(“x”) } } - needs an issue. (2) single-type match error { Bad::Neg => 1 else => 2 } (all named + else) gives rustc “Unreachable pattern” to the user, before and after this change. (3) inside an arm error is not narrowed to the named type (error.why is NK1107); Part I says what one member has is reached through the match - via variant bindings or Bad { why } (works now). Needs: none Changelog: A match over error names a type by its bare name or path and is complete when it names every type that can arrive, without else (ADR-357 D1, D5). Owner: ADR-357 is not fully built: D1 yes except the fatal exemption (an unnamed fatal type is still asked for), D2 yes, D5 yes; D3 (ledger-narrated NK1151 for a grown set) and D4 (NK2404 for the author) not built. ADR-023 D4’s “a bare name binds” now holds only for a name that is not a type. Disk freed: 0 GB (no target/release/nikaia-scratch); target/nikaia-project-tests 2.0G, / 23G free; new entries >100MB: run-bundle 336M, build-time-parsers 469M, build-time-bundle 483M Rs2nika: none

This site is open source. Improve this page.