purescript-lua
purescript-lua copied to clipboard
test: add regression test for issue #37 undefined variable bug
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.