diff options
Diffstat (limited to 'src/interp/interp.cc')
-rw-r--r-- | src/interp/interp.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/interp/interp.cc b/src/interp/interp.cc index 97f35f81..a3dd9b4a 100644 --- a/src/interp/interp.cc +++ b/src/interp/interp.cc @@ -78,6 +78,14 @@ Result Match(const Limits& expected, } } + if (expected.is_64 && !actual.is_64) { + *out_msg = StringPrintf("expected i64 memory, but i32 memory provided"); + return Result::Error; + } else if (actual.is_64 && !expected.is_64) { + *out_msg = StringPrintf("expected i32 memory, but i64 memory provided"); + return Result::Error; + } + return Result::Ok; } |