Open and answer this issue on GitHub.
ready · opened 2026-11-21 · updated 2026-11-21 · 0 comments
Part of #906 After #906
ADR-specialization-1 D1: a parameter marked comptime? (self included) makes a copy of the function for each build-time value a call gives it, and the ordinary function for the rest; two calls with equal values share one copy. A value is known by rule (a comptime binding, a literal, a comptime/comptime? parameter inside its copy, a part of one, a call the build may run), never because a let was folded. It builds on the per-value copies of a comptime parameter (ADR-333 D3, the first part, #906). Was #906 item 3.
comptime? on parameters and self: copies keyed by the value for known arguments, the function as written for the rest; the ledger carries the mark across packages. Test: both copies of a comptime? function, called once with a literal and once with a let of a run-time value (tests/compiler/tests/, .stdout).NK1305 for a comptime? parameter used where only a build-time value is allowed in the ordinary function (D3). Test: that refusal (.stderr).A comptime? function called with a literal and with a run-time value runs its copy and its ordinary body, and a comptime? parameter used where only a build-time value is allowed is NK1305, each shown by its test; the last commit carries Fixes #N for this issue, and the report gives a Found: line per finding.
Split from #906 by Claude Code