summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/type-checker.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/type-checker.cc b/src/type-checker.cc
index 7c14b6db..ef38a1bc 100644
--- a/src/type-checker.cc
+++ b/src/type-checker.cc
@@ -292,8 +292,10 @@ Result TypeChecker::OnBrIf(Index depth) {
COMBINE_RESULT(result, PopAndCheck1Type(Type::I32, "br_if"));
Label* label;
CHECK_RESULT(GetLabel(depth, &label));
- if (label->label_type != LabelType::Loop)
- COMBINE_RESULT(result, CheckSignature(label->sig, "br_if"));
+ if (label->label_type != LabelType::Loop) {
+ COMBINE_RESULT(result, PopAndCheckSignature(label->sig, "br_if"));
+ PushTypes(label->sig);
+ }
return result;
}