diff options
author | Alon Zakai <azakai@google.com> | 2021-01-14 00:13:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-13 16:13:19 -0800 |
commit | fcbefa951e3e514f6b7555664b89fb786850f6bc (patch) | |
tree | 70fef71b92baa881ac4aafcc75139353e2d535fd /src | |
parent | f882781c4bebba1625a745c2b19dc7f8e63aa531 (diff) | |
download | binaryen-fcbefa951e3e514f6b7555664b89fb786850f6bc.tar.gz binaryen-fcbefa951e3e514f6b7555664b89fb786850f6bc.tar.bz2 binaryen-fcbefa951e3e514f6b7555664b89fb786850f6bc.zip |
[GC] RTT types are not defaultable (#3489)
See WebAssembly/gc#175
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm/wasm-type.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp index ffc18b9fd..d3c4c0fc4 100644 --- a/src/wasm/wasm-type.cpp +++ b/src/wasm/wasm-type.cpp @@ -415,7 +415,7 @@ bool Type::isDefaultable() const { // A variable can get a default value if its type is concrete (unreachable // and none have no values, hence no default), and if it's a reference, it // must be nullable. - return isConcrete() && (!isRef() || isNullable()); + return isConcrete() && (!isRef() || isNullable()) && !isRtt(); } bool Type::operator<(const Type& other) const { |