mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 18:44:47 +01:00
If nonGC mode then StructType has also a negative code type of anyref.
This commit is contained in:
parent
425e14c6b6
commit
7c2d276de2
@ -121,7 +121,7 @@ class WasmOutputStream extends FilterOutputStream {
|
||||
* if an I/O error occurs.
|
||||
*/
|
||||
public void writeDefaultValue( AnyType type ) throws IOException {
|
||||
if( type.getCode() < 0 ) {
|
||||
if( type instanceof ValueType ) {
|
||||
ValueType valueType = (ValueType)type;
|
||||
switch( valueType ) {
|
||||
case i32:
|
||||
|
@ -479,7 +479,7 @@ public class TextModuleWriter extends ModuleWriter {
|
||||
* if an I/O error occurs.
|
||||
*/
|
||||
private static void writeDefaultValue( Appendable output, AnyType type ) throws IOException {
|
||||
if( type.getCode() < 0 ) {
|
||||
if( type instanceof ValueType ) {
|
||||
ValueType valueType = (ValueType)type;
|
||||
switch( valueType ) {
|
||||
case i32:
|
||||
|
Loading…
x
Reference in New Issue
Block a user