The inner `let` overwrote the outer one
This is a real bug from this codebase, and the shape of it is worth more than the fix. AtlasLang lowers local variables to named storage slots before SSA promotes them away. A test that had passed for weeks started producing the wrong value once a lesson example introduced a shadowed binding.
The program let x = 1; if (true) { let x = 2; print(x); } print(x); printed 2 and then 2. The inner block is supposed to introduce a new binding that dies at the closing brace, so the second print must see 1. No diagnostic was produced. The interpreter, which walks the AST and never goes near the IR, printed 2 then 1 — correctly.
Two implementations of the same language disagree: the tree-walking interpreter is right and the compiled path is wrong. Before looking at anything, write down which phases the two paths share and which they do not. The bug is in a phase they do not share, and that single observation narrows it to about three candidates.