aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-02-06 05:00:45 +0100
committerBjörn Gustavsson <[email protected]>2018-03-14 11:28:55 +0100
commit64859cc36efde18483f3a9116c85c2e73ecb304d (patch)
tree21a8cf8ed4e2eb0ea7c175bd8caee8e428c18c6d /lib/compiler
parent98d8d18584cffd9bae18f1f9be997ab00fac081e (diff)
downloadotp-64859cc36efde18483f3a9116c85c2e73ecb304d.tar.gz
otp-64859cc36efde18483f3a9116c85c2e73ecb304d.tar.bz2
otp-64859cc36efde18483f3a9116c85c2e73ecb304d.zip
v3_kernel_pp: Print return variables for #k_try{}
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/src/v3_kernel_pp.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/compiler/src/v3_kernel_pp.erl b/lib/compiler/src/v3_kernel_pp.erl
index ac91039ae0..e9cbe81088 100644
--- a/lib/compiler/src/v3_kernel_pp.erl
+++ b/lib/compiler/src/v3_kernel_pp.erl
@@ -248,7 +248,7 @@ format_1(#k_put{arg=A,ret=Rs}, Ctxt) ->
[format(A, Ctxt),
format_ret(Rs, ctxt_bump_indent(Ctxt, 1))
];
-format_1(#k_try{arg=A,vars=Vs,body=B,evars=Evs,handler=H}, Ctxt) ->
+format_1(#k_try{arg=A,vars=Vs,body=B,evars=Evs,handler=H,ret=Rs}, Ctxt) ->
Ctxt1 = ctxt_bump_indent(Ctxt, Ctxt#ctxt.body_indent),
["try",
nl_indent(Ctxt1),
@@ -264,7 +264,8 @@ format_1(#k_try{arg=A,vars=Vs,body=B,evars=Evs,handler=H}, Ctxt) ->
nl_indent(Ctxt1),
format(H, Ctxt1),
nl_indent(Ctxt),
- "end"
+ "end",
+ format_ret(Rs, Ctxt)
];
format_1(#k_try_enter{arg=A,vars=Vs,body=B,evars=Evs,handler=H}, Ctxt) ->
Ctxt1 = ctxt_bump_indent(Ctxt, Ctxt#ctxt.body_indent),