Skip to content

Commit

Permalink
Fix assert ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
Rerumu committed Nov 5, 2021
1 parent ad9b47b commit 485773c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Compiler/src/Compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2478,12 +2478,13 @@ struct Compiler
}
else if (AstStatContinue* stat = node->as<AstStatContinue>())
{
LUAU_ASSERT(!loops.empty());

if (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
// 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);

size_t label = bytecode.emitLabel();
Expand Down

0 comments on commit 485773c

Please sign in to comment.