You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P2] ! changes meaning with the VM's numeric representation #14
Reproduced during the 2026-09-04 language review at a20753c6cff96ee86758744e227a04460234a832. Priority: P2.
[!1, !(1 + 0)]
Observed optimized result: [false, 1.8446744073709552e+19]. The second value is truthy; consequently if !1 1 else 0 returns 0, while if !(1 + 0) 1 else 0 returns 1.
handle_not bitwise-complements values represented as f64, but applies boolean conversion to other values. Arithmetic constructs f64 values while small integer literals can use another representation. An internal storage optimization has become observable language behavior.
Define ! as logical negation with a boolean result for every admitted operand, or reject non-boolean operands consistently. If bitwise operations are wanted, give them a separately specified integer operation. Add representation-invariance tests: a numeric literal, an arithmetic result with the same value, a variable, and a host-data value must not acquire unrelated meanings because of storage tags.
Acceptance: implement the described correction, publish the resulting language contract, and add focused regression coverage including applicable capability, streaming-parser, and resource-limit cases.
Fix and executable regressions: PR #19. Workspace tests, explicit vendor suites, formatting, strict Clippy, and the Linux ARM64/RISC-V and Windows GNU compile checks pass locally. All GitHub Actions checks pass on f1e775f, including Linux tests, fuzzing, AddressSanitizer, and Miri. This issue remains open until the fix is merged.
Activity