The switch expression resets the pinnedreg at the end of the switch expression to -1, not the previous value causing issues with nested switch expression as can be seen in the following exmaple which causes a assertion failure when pluto is compiled with -DLUAI_ASSERT.
local l = switch 1 do
case 1->switch 1 do
case 1->1
end
case 2->2
case 3->3
end
The switch expression resets the
pinnedreg
at the end of the switch expression to-1
, not the previous value causing issues with nested switch expression as can be seen in the following exmaple which causes a assertion failure when pluto is compiled with-DLUAI_ASSERT
.