diff options
author | Björn Gustavsson <[email protected]> | 2014-01-17 15:32:06 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-01-17 15:41:41 +0100 |
commit | 1dde3381ebb040095de87279e4f0e65927b7d824 (patch) | |
tree | 1d6d5d18bda85e16ec9a1a20fd190e1c7e116f5d /lib/compiler | |
parent | 65a580abaa082019b7f21df719f0b29b1eee3577 (diff) | |
download | otp-1dde3381ebb040095de87279e4f0e65927b7d824.tar.gz otp-1dde3381ebb040095de87279e4f0e65927b7d824.tar.bz2 otp-1dde3381ebb040095de87279e4f0e65927b7d824.zip |
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.
Diffstat (limited to 'lib/compiler')
-rw-r--r-- | lib/compiler/src/v3_core.erl | 3 |
1 files changed, 2 insertions, 1 deletions
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}], |