Published June 3, 2026
| Version v0.40.x
Software
Open
alternative-intelligence-cp/nitpick: v0.40.x — Conditionals (if/else + the is ternary)
Description
Nitpick v0.40.x — Conditionals (if / else if / else + the is ternary)
The v0.40.x cycle hardened Nitpick's two conditional surfaces — the
if/else if/else statement chain and the is (cond) : a : b inline
value-ternary. All COND-DEC items (001–014) resolved across v0.40.0–v0.40.7.
Headline fix
A variable or borrow used only inside an is arm is no longer a false
[unused-variable]. The warning and borrow analyses (warnings.cpp
collectIdentifiers and borrow_checker.cpp checkExpression) now recurse
through the ternary's condition and both arms.
Other bugs fixed
- Mixed-width
isPHI verification failure — aniswhose two arms had different integer widths produced an ill-typed LLVM PHI; the narrower arm is now sign-extended to the common type first. exitnot treated as a branch terminator — dead code after anexitinside a branch now correctly flags[dead-code].
Diagnostics minted
ARIA-IS-001— incompatibleisarms.ARIA-IF-001— strayelse/else ifwith no precedingif.ARIA-IF-002— assignment=used as a condition (suggests==).ARIA-IF-003—ifused in value position (points atisandpick+give); ratifies thatifis a statement, never an expression.
Formal semantics
k-semantics/aria.k gains a native grammar production for the is ternary
(is ( Exp ) : Exp : Exp with strict(1) so only the condition is forced) and
two reduction rules selecting exactly one arm — modeling short-circuit directly.
Validation
- Compiler CTest: 201/201
- K core tests: 235/235 (adds 229–235 for the
isternary) - Bug regressions: bug951–bug990 (40 fixtures)
- Docs: new
guide/conditionals/8-chapter cookbook
Files
alternative-intelligence-cp/nitpick-v0.40.x.zip
Files
(26.8 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:db3b9e5bc245501255b16256c5edd4cd
|
26.8 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/alternative-intelligence-cp/nitpick/tree/v0.40.x (URL)
Software
- Repository URL
- https://github.com/alternative-intelligence-cp/nitpick