Issue #2598: NK2106’s help for an optional field writes a form NK1125 refuses: `struct…

Open and answer this issue on GitHub.

decision, bugs · opened 2026-11-21 · updated 2026-11-21 · 0 comments

Filed by the driver from the Found: of the run of issue-2592 (#2592) (owner, 2026-11-06).

Found

NK2106’s help for an optional field writes a form NK1125 refuses: struct Holder { b: Bytes? } / fn size(b: ref Bytes) -> i64 { return b.len() } / fn field(h: ref Holder) -> i64 { return size(h.b ?? Bytes([])) } draws NK2106 with help: Hand over a copy: h.b.clone(), and size(h.b.clone() ?? Bytes([])) then draws error[NK1125]: A Bytes? may be missing, so you can't reach its method directly.; the help should name a form that is accepted (a match h.b { null => ..., b => b.clone() }, or .clone() on an optional should be allowed, no decision yet which); suspected: the NK2106 help text in the checker’s ownership pass, which does not look at whether the given place is optional

To build

Done when

The probe or check gives the expected output the first item names from its ADR or Part I-III section, and a tests/compiler/tests/ test (or the named check) that failed on the unfixed tree is green; or the probe already passes on develop and a test pins it, naming the commit that fixed it; or the issue is closed as by design, naming the function or ADR.


Generated by Claude Code

Back to Open Issues