diff options
author | Björn Gustavsson <[email protected]> | 2017-09-08 10:19:13 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-09-08 10:19:13 +0200 |
commit | 09e833c0795168a6380f62c167ff1a7bfd481b07 (patch) | |
tree | 1370d85f0d2e1b9bf86e45318c119fd0b93727d5 /lib/stdlib | |
parent | aebaa8a4e0670217a2f91d3456119824ee2c8500 (diff) | |
parent | 085e80ea7d5b56a8603f19ece0fe8e0c506b63da (diff) | |
download | otp-09e833c0795168a6380f62c167ff1a7bfd481b07.tar.gz otp-09e833c0795168a6380f62c167ff1a7bfd481b07.tar.bz2 otp-09e833c0795168a6380f62c167ff1a7bfd481b07.zip |
Merge branch 'maint'
* maint:
Update primary bootstrap
Eliminate incorrect get_stacktrace/0 warning
Conflicts:
bootstrap/bin/start.boot
bootstrap/bin/start_clean.boot
bootstrap/lib/compiler/ebin/beam_utils.beam
bootstrap/lib/compiler/ebin/beam_validator.beam
bootstrap/lib/compiler/ebin/sys_core_fold.beam
bootstrap/lib/kernel/ebin/error_logger.beam
bootstrap/lib/kernel/ebin/file_server.beam
bootstrap/lib/kernel/ebin/global.beam
bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
bootstrap/lib/kernel/ebin/kernel.appup
bootstrap/lib/kernel/ebin/net_kernel.beam
bootstrap/lib/kernel/ebin/user_drv.beam
bootstrap/lib/stdlib/ebin/c.beam
bootstrap/lib/stdlib/ebin/dets.beam
bootstrap/lib/stdlib/ebin/dets_utils.beam
bootstrap/lib/stdlib/ebin/edlin.beam
bootstrap/lib/stdlib/ebin/erl_lint.beam
bootstrap/lib/stdlib/ebin/error_logger_file_h.beam
bootstrap/lib/stdlib/ebin/error_logger_tty_h.beam
bootstrap/lib/stdlib/ebin/escript.beam
bootstrap/lib/stdlib/ebin/ets.beam
bootstrap/lib/stdlib/ebin/gen_event.beam
bootstrap/lib/stdlib/ebin/gen_fsm.beam
bootstrap/lib/stdlib/ebin/gen_server.beam
bootstrap/lib/stdlib/ebin/gen_statem.beam
bootstrap/lib/stdlib/ebin/otp_internal.beam
bootstrap/lib/stdlib/ebin/proc_lib.beam
bootstrap/lib/stdlib/ebin/qlc.beam
bootstrap/lib/stdlib/ebin/shell.beam
bootstrap/lib/stdlib/ebin/slave.beam
bootstrap/lib/stdlib/ebin/string.beam
bootstrap/lib/stdlib/ebin/supervisor.beam
Diffstat (limited to 'lib/stdlib')
-rw-r--r-- | lib/stdlib/src/erl_lint.erl | 4 | ||||
-rw-r--r-- | lib/stdlib/test/erl_lint_SUITE.erl | 22 |
2 files changed, 23 insertions, 3 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index 65ba343368..9cd4727dc3 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -3238,13 +3238,13 @@ icrt_clauses(Cs, In, Vt, St0) -> icrt_clauses(Cs, Vt, St) -> mapfoldl(fun (C, St0) -> icrt_clause(C, Vt, St0) end, St, Cs). -icrt_clause({clause,_Line,H,G,B}, Vt0, St0) -> +icrt_clause({clause,_Line,H,G,B}, Vt0, #lint{catch_scope=Scope}=St0) -> {Hvt,Binvt,St1} = head(H, Vt0, St0), Vt1 = vtupdate(Hvt, Binvt), {Gvt,St2} = guard(G, vtupdate(Vt1, Vt0), St1), Vt2 = vtupdate(Gvt, Vt1), {Bvt,St3} = exprs(B, vtupdate(Vt2, Vt0), St2), - {vtupdate(Bvt, Vt2),St3}. + {vtupdate(Bvt, Vt2),St3#lint{catch_scope=Scope}}. icrt_export(Vts, Vt, {Tag,Attrs}, St) -> {_File,Loc} = loc(Attrs, St), diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl index cb1cceb8db..b76bece07f 100644 --- a/lib/stdlib/test/erl_lint_SUITE.erl +++ b/lib/stdlib/test/erl_lint_SUITE.erl @@ -4104,7 +4104,27 @@ get_stacktrace(Config) -> [], {warnings,[{4,erl_lint,{get_stacktrace,wrong_part_of_try}}, {13,erl_lint,{get_stacktrace,after_try}}, - {22,erl_lint,{get_stacktrace,after_try}}]}}], + {22,erl_lint,{get_stacktrace,after_try}}]}}, + {multiple_catch_clauses, + <<"maybe_error(Arg) -> + try 5 / Arg + catch + error:badarith -> + _Stacktrace = erlang:get_stacktrace(), + try io:nl() + catch + error:_ -> io:format('internal error') + end; + error:badarg -> + _Stacktrace = erlang:get_stacktrace(), + try io:format(qwe) + catch + error:_ -> io:format('internal error') + end + end. + ">>, + [], + []}], run(Config, Ts), ok. |