diff options
author | Björn Gustavsson <[email protected]> | 2012-08-15 11:05:30 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-08-15 11:05:30 +0200 |
commit | c5e5cf792d87e0d23f80ff572f499f0e3e044933 (patch) | |
tree | 585bc144e76486ed0959e4675015fbb760c6c33c /lib/stdlib/src | |
parent | 9492bf7abbf5e43a9bdada5b0ace0432ce1f4223 (diff) | |
parent | 6cdc6b667a8db2b63a4613c63dc4f75a34a5ea7f (diff) | |
download | otp-c5e5cf792d87e0d23f80ff572f499f0e3e044933.tar.gz otp-c5e5cf792d87e0d23f80ff572f499f0e3e044933.tar.bz2 otp-c5e5cf792d87e0d23f80ff572f499f0e3e044933.zip |
Merge branch 'bjorn/compiler/minor-fixes/OTP-10185' into maint
* bjorn/compiler/minor-fixes/OTP-10185:
erl_lint: Add a deprecated warning for literal tuple funs
beam_utils:live_opt/1: Correct handling of try_case_end/1
Correct guard_SUITE_tuple_size.S
beam_type: Print the offending function if this pass crashes
beam_validator: Validate the size operand in bs_init_bits and bs_init2
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/erl_lint.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index abab81d31f..648ff349a4 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -248,6 +248,8 @@ format_error({illegal_guard_local_call, {F,A}}) -> io_lib:format("call to local/imported function ~w/~w is illegal in guard", [F,A]); format_error(illegal_guard_expr) -> "illegal guard expression"; +format_error(deprecated_tuple_fun) -> + "tuple funs are deprecated and will be removed in R16"; %% --- exports --- format_error({explicit_export,F,A}) -> io_lib:format("in this release, the call to ~w/~w must be written " @@ -1914,7 +1916,8 @@ gexpr({call,Line,{remote,_Lr,{atom,_Lm,erlang},{atom,_Lf,F}},As}, Vt, St0) -> true -> {Asvt,St1}; false -> {Asvt,add_error(Line, illegal_guard_expr, St1)} end; -gexpr({call,L,{tuple,Lt,[{atom,Lm,erlang},{atom,Lf,F}]},As}, Vt, St) -> +gexpr({call,L,{tuple,Lt,[{atom,Lm,erlang},{atom,Lf,F}]},As}, Vt, St0) -> + St = add_warning(L, deprecated_tuple_fun, St0), gexpr({call,L,{remote,Lt,{atom,Lm,erlang},{atom,Lf,F}},As}, Vt, St); gexpr({op,Line,Op,A}, Vt, St0) -> {Avt,St1} = gexpr(A, Vt, St0), |