purescript-lua icon indicating copy to clipboard operation
purescript-lua copied to clipboard

test: add regression test for issue #37 undefined variable bug

Open Unisay opened this issue 1 month ago • 0 comments

Add golden test reproducing the scenario from issue #37 where monadic code with nested do-blocks and function composition previously generated invalid Lua code with undefined variable references (Bind11).

The test verifies correct compilation of:

  • Nested monadic do-blocks
  • Bind dictionary threading through local scopes
  • Function composition within array literals

Current compilation generates valid Lua code with properly scoped local variables, suggesting the bug has been fixed. This test serves as a regression guard.

Unisay avatar Oct 14 '25 16:10 Unisay