Prometheus
Prometheus copied to clipboard
[BUG] VMify "Unresolved Upvalue" error during special repeat until case
VMify will fail if there's a repeat until statement that references a local in the until
condition that was first defined in the repeat
's body
Code to reproduce:
repeat
local x = 5
until x == 5 -- The condition here should see the `local x = 5` above, as they are actually contained in the same scope
The actual code that parses the repeat until (src/prometheus/parser.lua#L225-L233) is parsing the condition with the return's scope, which should be good, but for some reason something later is breaking because of this, and I have no idea what