diff options
Diffstat (limited to 'src/wasm/literal.cpp')
-rw-r--r-- | src/wasm/literal.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index ce1c73d56..3f635ca19 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -136,29 +136,29 @@ ExceptionPackage Literal::getExceptionPackage() const { Literal Literal::castToF32() { assert(type == Type::i32); - Literal ret(i32); - ret.type = Type::f32; + Literal ret(Type::f32); + ret.i32 = i32; return ret; } Literal Literal::castToF64() { assert(type == Type::i64); - Literal ret(i64); - ret.type = Type::f64; + Literal ret(Type::f64); + ret.i64 = i64; return ret; } Literal Literal::castToI32() { assert(type == Type::f32); - Literal ret(i32); - ret.type = Type::i32; + Literal ret(Type::i32); + ret.i32 = i32; return ret; } Literal Literal::castToI64() { assert(type == Type::f64); - Literal ret(i64); - ret.type = Type::i64; + Literal ret(Type::i64); + ret.i64 = i64; return ret; } |