mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Fix assert ordering
This commit is contained in:
parent
ad9b47b72f
commit
485773ca82
1 changed files with 2 additions and 1 deletions
|
@ -2478,12 +2478,13 @@ struct Compiler
|
||||||
}
|
}
|
||||||
else if (AstStatContinue* stat = node->as<AstStatContinue>())
|
else if (AstStatContinue* stat = node->as<AstStatContinue>())
|
||||||
{
|
{
|
||||||
|
LUAU_ASSERT(!loops.empty());
|
||||||
|
|
||||||
if (loops.back().untilCondition)
|
if (loops.back().untilCondition)
|
||||||
validateContinueUntil(stat, loops.back().untilCondition);
|
validateContinueUntil(stat, loops.back().untilCondition);
|
||||||
|
|
||||||
// before continuing, we need to close all local variables that were captured in closures since loop start
|
// before continuing, we need to close all local variables that were captured in closures since loop start
|
||||||
// normally they are closed by the enclosing blocks, including the loop block, but we're skipping that here
|
// normally they are closed by the enclosing blocks, including the loop block, but we're skipping that here
|
||||||
LUAU_ASSERT(!loops.empty());
|
|
||||||
closeLocals(loops.back().localOffset);
|
closeLocals(loops.back().localOffset);
|
||||||
|
|
||||||
size_t label = bytecode.emitLabel();
|
size_t label = bytecode.emitLabel();
|
||||||
|
|
Loading…
Add table
Reference in a new issue