Commit 8f6aad2f authored by Damien George's avatar Damien George
Browse files

py/emitnative.c: Fix stack adjustment when erroring on binary op.

parent eaefc8b9
......@@ -2077,10 +2077,10 @@ STATIC void emit_native_binary_op(emit_t *emit, mp_binary_op_t op) {
}
emit_post_push_reg(emit, VTYPE_PYOBJ, REG_RET);
} else {
adjust_stack(emit, -1);
EMIT_NATIVE_VIPER_TYPE_ERROR(emit,
"can't do binary op between '%q' and '%q'",
vtype_to_qstr(vtype_lhs), vtype_to_qstr(vtype_rhs));
emit_post_push_reg(emit, VTYPE_PYOBJ, REG_RET);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment