From 1dde3381ebb040095de87279e4f0e65927b7d824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 17 Jan 2014 15:32:06 +0100 Subject: compiler: Silence false warning for unmatched return in 'after' clause Because 26940a8c0c lifted code in the 'after' clause of 'try' to a new function, Dialyzer could produce false warnings for code such as: try ... after file:close(F) end. Mark the the call to the generated function as 'compiler_generated' to silence the warning. --- lib/compiler/src/v3_core.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/compiler/src/v3_core.erl') diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl index 321cf7af1c..a5f31f3844 100644 --- a/lib/compiler/src/v3_core.erl +++ b/lib/compiler/src/v3_core.erl @@ -563,7 +563,8 @@ expr({'try',L,Es0,[],[],As0}, St0) -> guard=[#c_literal{val=true}], body=As1}], fc=Fc}, - App = #iapply{anno=Lanno,op=#c_var{anno=LA,name={Name,0}},args=[]}, + App = #iapply{anno=#a{anno=[compiler_generated|LA]}, + op=#c_var{anno=LA,name={Name,0}},args=[]}, {Evs,Hs,St5} = try_after([App], St4), Try = #itry{anno=Lanno,args=Es1,vars=[V],body=[App,V],evars=Evs,handler=Hs}, Letrec = #iletrec{anno=Lanno,defs=[{{Name,0},Fun}], -- cgit v1.2.3