s.len() on text, against ADR-320 D3Open and answer this issue on GitHub.
ready · opened 2026-11-15 · updated 2026-11-15 · 0 comments
ADR-320 D3 says text is read through a view that names its unit: there is no s.len() and no s[i] on text. D4 gives s.bytes.len() in constant time. The checker still accepts s.len() on a text.
fn main() {
let s = "abc"
println(s.len())
}
Expected: an error naming the views (s.bytes.len(), s.chars().count()). Actual: it compiles and prints 3.
Found by the prover lane on #1556 (the bounds walk now treats s.len() and s.bytes.len() as one length; that stays correct after this change).
.len() on a text receiver with a new NK code (from the block the supervisor reserves), the message naming s.bytes.len() and s.chars().count()..len() in crates/nikaia-std/src/tools/*.nika, tools/*.nika, scripts/*.nika, packages and tests/compiler/ to s.bytes.len() (byte length is what they mean today); re-lower.s.len() on text are corrected.tests/compiler/ with the .stderr of the refusal.The probe is refused with the new code, no .nika in the repository calls .len() on text, and the suite is green.
Generated by Claude Code