summaryrefslogtreecommitdiff
path: root/src/type-checker.cc
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2019-11-15 10:11:50 -0800
committerGitHub <noreply@github.com>2019-11-15 10:11:50 -0800
commit80bac7d4a7ca1d80bf3ac2313bbf349f6f29da38 (patch)
tree94fbce829adbb574ee0427c34f700eff2dd02738 /src/type-checker.cc
parentddcec7c6122bbf0ee82a197fbb739ffcc52b63d9 (diff)
downloadwabt-80bac7d4a7ca1d80bf3ac2313bbf349f6f29da38.tar.gz
wabt-80bac7d4a7ca1d80bf3ac2313bbf349f6f29da38.tar.bz2
wabt-80bac7d4a7ca1d80bf3ac2313bbf349f6f29da38.zip
Fix expected stack layout when typechecking select instruction (#1222)
The i32 condition variable should be the right-most type in the error report. Update bad-select-cond.txt to distinguish the difference and prevent regression.
Diffstat (limited to 'src/type-checker.cc')
-rw-r--r--src/type-checker.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type-checker.cc b/src/type-checker.cc
index d4a18046..6a224d8f 100644
--- a/src/type-checker.cc
+++ b/src/type-checker.cc
@@ -711,7 +711,7 @@ Result TypeChecker::OnSelect() {
result |= PeekAndCheckType(0, Type::I32);
result |= PeekType(1, &type);
result |= PeekAndCheckType(2, type);
- PrintStackIfFailed(result, "select", Type::I32, type, type);
+ PrintStackIfFailed(result, "select", type, type, Type::I32);
result |= DropTypes(3);
PushType(type);
return result;