int in a described Rust contract is refused (NK1262), with a located finding from a contracts fileOpen and answer this issue on GitHub.
ready · opened 2026-11-21 · updated 2026-11-21 · 0 comments
Part of #630
ADR-285 D38: where the representation shows, a fixed width is written, and int there is refused with NK1262 (`int` can't be written where C sees the value). Built for extern fn, extern struct and extern { } (fa83c07c, widths_written in crates/nikaia-std/src/compiler/types.nika), not for a described Rust contract (a nikaia.contracts file beside a crate). The reason, from the build of fa83c07c: a ledger that fails to parse is dropped (read_beside in crates/nikaia-std/src/compiler/project_members.nika and modules.nika returns Ledger?, null on failure), so nothing reports a finding with a location from a contracts file. The refusal needs that first.
tests/compiler/tests/ (with .stderr): a project whose nikaia.contracts does not parse gets a finding naming the file and line.NK1262 for an int in a described Rust contract. Test in tests/compiler/tests/ (with .stderr): a project whose nikaia.contracts describes a function with an int parameter is refused with NK1262 at that line.A project whose nikaia.contracts writes int in a described function is refused with NK1262 naming the contracts file and line, and a contracts file that does not parse gets a finding with its location, each shown by a test in tests/compiler/tests/; the commit that builds item 2 carries the Fixes line for this issue.
Split from #630 by Claude Code