Result: done
Files: crates/nikaia-std/src/tools/check_core_stmt.nika crates/nikaia-std/src/tools/check_flow.nika crates/nikaia-std/src/tools/check_numbers3.nika crates/nikaia-std/src/tools/check_numbers4.nika crates/nikaia-std/src/tools/check_core_call_on.nika crates/nikaia-std/src/tools/lowered/check_core_stmt.rs crates/nikaia-std/src/tools/lowered/check_flow.rs crates/nikaia-std/src/tools/lowered/check_numbers3.rs crates/nikaia-std/src/tools/lowered/check_numbers4.rs crates/nikaia-std/src/tools/lowered/check_core_call_on.rs tests/compiler/tests/a_list_of_number_lists_has_one_open_number.nika tests/compiler/tests/a_list_of_number_lists_has_one_open_number.stdout
Commit: check: a list of number lists has one open number for its innermost elements (Fixes #938)
Body: CheckOpenNumber gains levels (0 own number, 1 a list’s elements, 2+ a list of lists) and the flow open_levels (binding -> lists around the number, where more than one). A let of a list literal whose items are list literals down to numbers at one depth, and whose type is Vec[..Vec[?]] as deep, opens one number and gives it every innermost literal; number_lets writes the type inside that many Vec<..>. open_list_of hands the number and its level through a name and through indexes (one level fewer each), so grid[i][j] is the number, let row = grid[0] and for r in grid bind a list one level in, for n in grid[0] binds the number (a lent walk copies it, as a6ec14b3 does for one level), and a parameter Vec[Vec[u8]] asks u8 of it. An empty inner list or a mixed depth stays as before.
Fixes: #938
Tests: new test passes; its rows a, b, c, f failed on the pre-change binary (same programs as the brief’s matrix, NK1245 / rustc Mismatched types); extra probes (mutable m[0][0] = 5, [[1, 2], []], for r in g { first(r) } with Vec[u8], [[1, 300]] asked u8 -> NK1116 naming “the elements of big”) behave; it: number_literal numbers_by_use list_literal literals number_methods + guard set 146 passed; tests/compiler both settings: new test and a_loop_over_an_untyped_number_list_copies ok, 419 passed, 7 FAILED (settings disagree: NK2302 places view of s, NK2101 trait column) attributed to the uncommitted text_tiers.nika of another agent in the tree (text-view and keep refusals, no number in them; not isolated by a rebuild without it), not in this commit; clippy clean; pre-push-check ok
Gate: green
Deviation: none
Found: none
Needs: supervisor: tests/compiler at user-parallelism=no fails 7 tests (a_proved_value_bound_by_let_is_given_up, a_text_literal_*, a_trait_column_change_warns, an_owned_local_lent_through_arms, grammar_a_guard_reads_a_binding_text_label, map_get_lent_to_nullable_ref) with the uncommitted text_tiers.nika/.rs in the shared tree (NK2302 in tests/compiler/src/main.nika places)
Changelog: A list of number lists written without a type ([[1, 2], [3]]) has one open number for its innermost elements: its uses through an index or a walk type it, and the program builds where it fell back to i32 in rustc or was refused with NK1245 (ADR-285 D34, #938).
Owner: none
Disk freed: 0.02 GB (scratch binary copy); cache 2.3G, disk 8.9G free, new entry run-bundle/2df207096bba39fb 286 MB
Rs2nika: none
Pushed: 13da7f06 (pushed by drive.nika)