diff options
Diffstat (limited to 'src/wasm-validator.h')
-rw-r--r-- | src/wasm-validator.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 4d198ac34..4631a63b8 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -426,7 +426,9 @@ public: if (!validateGlobally) return; shouldBeTrue(curr->init != nullptr, curr->name, "global init must be non-null"); shouldBeTrue(curr->init->is<Const>() || curr->init->is<GetGlobal>(), curr->name, "global init must be valid"); - shouldBeEqual(curr->type, curr->init->type, nullptr, "global init must have correct type"); + if (!shouldBeEqual(curr->type, curr->init->type, curr->init, "global init must have correct type")) { + std::cerr << "(on global " << curr->name << '\n'; + } } void visitFunction(Function *curr) { |