Prometheus icon indicating copy to clipboard operation
Prometheus copied to clipboard

[BUG] VMify "Unresolved Upvalue" error during special repeat until case

Open 9382 opened this issue 7 months ago • 3 comments

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

9382 avatar Jul 15 '24 08:07 9382