summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm/wasm-type.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp
index 9bae42e98..eb1bd14b1 100644
--- a/src/wasm/wasm-type.cpp
+++ b/src/wasm/wasm-type.cpp
@@ -2278,9 +2278,11 @@ Type TypeBuilder::getTempRttType(Rtt rtt) {
void TypeBuilder::setSubType(size_t i, size_t j) {
assert(i < size() && j < size() && "index out of bounds");
- HeapTypeInfo* sub = impl->entries[i].info.get();
- HeapTypeInfo* super = impl->entries[j].info.get();
- sub->supertype = super;
+ if (typeSystem == TypeSystem::Nominal) {
+ HeapTypeInfo* sub = impl->entries[i].info.get();
+ HeapTypeInfo* super = impl->entries[j].info.get();
+ sub->supertype = super;
+ }
}
namespace {