summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-04-21 06:56:08 -0700
committerGitHub <noreply@github.com>2022-04-21 06:56:08 -0700
commit16fc4cb87558557ca8d608e8f818fc1fdfe95983 (patch)
tree151b3ab3d3817c1a01a8b862aa0d4e4671a7e31c /src
parent68807a4f8570a58f9e5d3756f54476884b97a366 (diff)
downloadbinaryen-16fc4cb87558557ca8d608e8f818fc1fdfe95983.tar.gz
binaryen-16fc4cb87558557ca8d608e8f818fc1fdfe95983.tar.bz2
binaryen-16fc4cb87558557ca8d608e8f818fc1fdfe95983.zip
[NominalFuzzing] Fix replaceWithIdenticalType() on nondefaultable tuples (#4605)
Diffstat (limited to 'src')
-rw-r--r--src/wasm-builder.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index a66322eb4..7bd2eecfc 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -1148,7 +1148,7 @@ public:
// Returns a replacement with the precise same type, and with minimal contents
// as best we can. As a replacement, this may reuse the input node.
template<typename T> Expression* replaceWithIdenticalType(T* curr) {
- if (curr->type.isTuple()) {
+ if (curr->type.isTuple() && curr->type.isDefaultable()) {
return makeConstantExpression(Literal::makeZeros(curr->type));
}
if (curr->type.isNullable()) {