diff options
-rw-r--r-- | src/wat-writer.cc | 2 | ||||
-rw-r--r-- | test/roundtrip/rethrow.txt | 23 |
2 files changed, 24 insertions, 1 deletions
diff --git a/src/wat-writer.cc b/src/wat-writer.cc index 81d379d1..837f109e 100644 --- a/src/wat-writer.cc +++ b/src/wat-writer.cc @@ -904,7 +904,7 @@ Result WatWriter::ExprVisitorDelegate::OnThrowExpr(ThrowExpr* expr) { } Result WatWriter::ExprVisitorDelegate::OnRethrowExpr(RethrowExpr* expr) { - writer_->WritePutsSpace(Opcode::Rethrow_Opcode.GetName()); + writer_->WritePutsNewline(Opcode::Rethrow_Opcode.GetName()); return Result::Ok; } diff --git a/test/roundtrip/rethrow.txt b/test/roundtrip/rethrow.txt new file mode 100644 index 00000000..84a7a93e --- /dev/null +++ b/test/roundtrip/rethrow.txt @@ -0,0 +1,23 @@ +;;; TOOL: run-roundtrip +;;; ARGS: --stdout --enable-exceptions +(module + (event $e0 (param i32)) + + (func + try + catch + rethrow + end + ) +) +(;; STDOUT ;;; +(module + (type (;0;) (func (param i32))) + (type (;1;) (func)) + (func (;0;) (type 1) + try ;; label = @1 + catch + rethrow + end) + (event (;0;) (type 0) (param i32))) +;;; STDOUT ;;) |