diff options
Diffstat (limited to 'src/type-checker.cc')
-rw-r--r-- | src/type-checker.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/type-checker.cc b/src/type-checker.cc index 3e875a31..9453dee2 100644 --- a/src/type-checker.cc +++ b/src/type-checker.cc @@ -492,7 +492,7 @@ Result TypeChecker::OnCallIndirect(const TypeVector& param_types, Result TypeChecker::OnFuncRef(Index* out_index) { Type type; Result result = PeekType(0, &type); - if (!type.IsIndex()) { + if (!(type == Type::Any || type.IsIndex())) { TypeVector actual; if (Succeeded(result)) { actual.push_back(type); @@ -766,7 +766,7 @@ Result TypeChecker::OnRefNullExpr(Type type) { Result TypeChecker::OnRefIsNullExpr() { Type type; Result result = PeekType(0, &type); - if (!type.IsRef()) { + if (!(type == Type::Any || type.IsRef())) { TypeVector actual; if (Succeeded(result)) { actual.push_back(type); |