Issue #2976: nikaia fmt indents the block of a head it breaks at an operator one level…

Open and answer this issue on GitHub.

decision, bugs · opened 2026-11-30 · updated 2026-11-30 · 0 comments

Filed by the driver from the Found: of the run of issue-2740 (#2740) (owner, 2026-11-06).

Found

nikaia fmt indents the block of a head it breaks at an operator one level too deep, with its } there too: fn main() throws {\n let first_condition_holds = true\n let second_condition_holds = false\n if first_condition_holds && second_condition_holds || first_condition_holds && !second_condition_holds {\n println("x")\n }\n println("y")\n} formats to \tif first_condition_holds && second_condition_holds / \t\t|| first_condition_holds && !second_condition_holds { / \t\t\tprintln("x") / \t\t} (body three tabs, } two tabs, not at the if’s level); the program still prints x y; ADR-337 D1 says nothing of where a broken head’s block goes, so the expected shape (body at two tabs and } at one, like a broken call’s )) needs no decision yet beyond that; suspected indent_of/print in crates/nikaia-std/src/compiler/fmt.nika keeping the continuation’s extra level for the block (check: trace the frame inner pushed for the { of a continued line); nikaia fmt on HEAD 12ea0c76a, a file with no manifest

To build

Done when

The probe or check gives the expected output the first item names from its ADR or Part I-III section, and a tests/compiler/tests/ test (or the named check) that failed on the unfixed tree is green; or the probe already passes on develop and a test pins it, naming the commit that fixed it; or the issue is closed as by design, naming the function or ADR.


Generated by Claude Code

Back to Open Issues