Skip to content

Commit

Permalink
Bug fixes for assert on True expression
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLBuehler authored Dec 6, 2022
1 parent d92807a commit 3b92da5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3936,7 +3936,7 @@ int compile_expr(struct compiler* compiler, Node* expr){

case N_ASSERT: {
compile_expr_keep(compiler, ASSERT(expr->node)->expr);
add_instruction(compiler, compiler->instructions,POP_JMP_TOS_TRUE, (compiler->instructions->count*2)+2, GET_ANNO_N(expr));
add_instruction(compiler, compiler->instructions,POP_JMP_TOS_TRUE, (compiler->instructions->count*2)+4, GET_ANNO_N(expr));
add_instruction(compiler, compiler->instructions,RAISE_ASSERTIONERR, 0, GET_ANNO_N(expr));
break;
}
Expand Down

0 comments on commit 3b92da5

Please sign in to comment.