diff --git a/src/tools/wasm-shell.cpp b/src/tools/wasm-shell.cpp index 2750f9d0b1e..c07108937c0 100644 --- a/src/tools/wasm-shell.cpp +++ b/src/tools/wasm-shell.cpp @@ -102,6 +102,7 @@ struct Shell { std::shared_ptr wasm; if (auto* quoted = std::get_if(&mod.module)) { wasm = std::make_shared(); + wasm->features = FeatureSet::All; switch (quoted->type) { case QuotedModuleType::Text: { CHECK_ERR(parseModule(*wasm, quoted->module)); diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp index 3b0262ed2ee..129d4eef457 100644 --- a/src/wasm/wasm-type.cpp +++ b/src/wasm/wasm-type.cpp @@ -2419,6 +2419,12 @@ bool isValidSupertype(const HeapTypeInfo& sub, const HeapTypeInfo& super) { if (!super.described || sub.described->supertype != super.described) { return false; } + } else { + // A supertype of a type without a describes clause must also not have a + // describes clause. + if (super.described) { + return false; + } } SubTyper typer; switch (sub.kind) {