summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-binary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r--src/wasm/wasm-binary.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index 20815b701..0a65fbadb 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -1521,7 +1521,7 @@ void WasmBinaryWriter::writeType(Type type) {
// those more refined types.
if (!wasm->features.hasGC()) {
auto ht = type.getHeapType();
- if (ht.isBasic() && ht.getBasic(Unshared) == HeapType::string) {
+ if (ht.isMaybeShared(HeapType::string)) {
// Do not overgeneralize stringref to anyref. We have tests that when a
// stringref is expected, we actually get a stringref. If we see a
// string, the stringref feature must be enabled.