Issue #2569: After the migration: an unmarked kept parameter is refused in every file, and ref outside extern “C” is an error

Open and answer this issue on GitHub.

ready · opened 2026-11-21 · updated 2026-11-21 · 0 comments

Part of #1213 After #2567 After #2568

What it is

Once the tree is migrated, the two transition allowances of views-3 end (ADR-views-v4 D2, D4). Today a body that keeps an unmarked parameter is refused (NK2302) only in a file that writes keep at least once (the transition rule at the top of crates/nikaia-std/src/compiler/check_keep_marks.nika, built in 6f97fbcf), and a ref outside extern "C" gets only the warning NK1261 (“ref is redundant here”; probe fn size(s: ref String) -> i64 on develop, 2026-11-21). D4: “A ref written anywhere else is refused, with a help that removes it.” Was #1213 item 6’s last sentence and item 2’s every-file rule.

To build

  1. Remove the transition rule: a kept unmarked parameter is NK2302 in every file. Test: an_unmarked_kept_parameter_is_refused_in_a_file_that_writes_keep gains a twin without any keep in the file, refused the same (tests/compiler/tests/, .stderr).
  2. ref outside extern "C" is refused with a help that removes it; NK1261’s warning retires. Which code it carries (NK1261 made an error, or a new one) is the supervisor’s choice; the builder asks for it. Test: the size(s: ref String) probe refused, and an extern "C" declaration with ref Array[u8] still accepted.

Done when

A kept unmarked parameter is refused in any file, and ref outside extern "C" is an error naming its removal, each shown by its test, with the tree green after both; the last commit carries Fixes #N for this issue, and the report gives a Found: line per finding.

Split from #1213 by Claude Code

Back to Open Issues