diff options
Diffstat (limited to 'src/wasm-validator.h')
-rw-r--r-- | src/wasm-validator.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wasm-validator.h b/src/wasm-validator.h index b4818e253..ca89270e9 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -283,6 +283,7 @@ public: void visitReturn(Return* curr) { if (curr->value) { + shouldBeFalse(curr->value->is<Nop>(), curr, "cannot return a nop"); if (returnType == unreachable) { returnType = curr->value->type; } else if (curr->value->type != unreachable && returnType != curr->value->type) { |