From f5147a14e7a7c447bfbc38d05dff19a5231697c0 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Thu, 21 Mar 2024 19:08:49 -0700 Subject: Mark non-closed types as requiring GC (#6421) This omission was able to cause a problem with text round-tripping. --- src/wasm/wasm-type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp index b14e5aa39..5957f9388 100644 --- a/src/wasm/wasm-type.cpp +++ b/src/wasm/wasm-type.cpp @@ -933,7 +933,7 @@ FeatureSet Type::getFeatures() const { if (heapType->isStruct() || heapType->isArray() || heapType->getRecGroup().size() > 1 || - heapType->getDeclaredSuperType()) { + heapType->getDeclaredSuperType() || heapType->isOpen()) { feats |= FeatureSet::ReferenceTypes | FeatureSet::GC; } else if (heapType->isSignature()) { // This is a function reference, which requires reference types and -- cgit v1.2.3