diff options
author | Hans Bolinder <[email protected]> | 2018-02-07 11:41:46 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2018-02-07 11:41:46 +0100 |
commit | ddd9b35a529589edc46e04655fefba74dd2179f0 (patch) | |
tree | 370a4b36be6b82da331db06d3c852efacc79cc00 /lib/dialyzer/src | |
parent | 3cb3d5c1927e6235b0e51ba7ca31e2a3458fba01 (diff) | |
parent | 57406f28602b0207879f08311c7e36629fb9c0bf (diff) | |
download | otp-ddd9b35a529589edc46e04655fefba74dd2179f0.tar.gz otp-ddd9b35a529589edc46e04655fefba74dd2179f0.tar.bz2 otp-ddd9b35a529589edc46e04655fefba74dd2179f0.zip |
Merge branch 'hasse/dialyzer/stacktrace_variable/OTP-14862'
* hasse/dialyzer/stacktrace_variable/OTP-14862:
dialyzer: Assign a type to the primop build_stacktrace
Diffstat (limited to 'lib/dialyzer/src')
-rw-r--r-- | lib/dialyzer/src/dialyzer_dataflow.erl | 2 | ||||
-rw-r--r-- | lib/dialyzer/src/dialyzer_typesig.erl | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl index 384912f983..32f58efc75 100644 --- a/lib/dialyzer/src/dialyzer_dataflow.erl +++ b/lib/dialyzer/src/dialyzer_dataflow.erl @@ -299,7 +299,7 @@ traverse(Tree, Map, State) -> match_fail -> t_none(); raise -> t_none(); bs_init_writable -> t_from_term(<<>>); - build_stacktrace -> t_list(); + build_stacktrace -> erl_bif_types:type(erlang, build_stacktrace, 0); Other -> erlang:error({'Unsupported primop', Other}) end, {State, Map, Type}; diff --git a/lib/dialyzer/src/dialyzer_typesig.erl b/lib/dialyzer/src/dialyzer_typesig.erl index b1f6a54503..6776f87b66 100644 --- a/lib/dialyzer/src/dialyzer_typesig.erl +++ b/lib/dialyzer/src/dialyzer_typesig.erl @@ -418,7 +418,11 @@ traverse(Tree, DefinedVars, State) -> match_fail -> throw(error); raise -> throw(error); bs_init_writable -> {State, t_from_term(<<>>)}; - build_stacktrace -> {State, t_list()}; + build_stacktrace -> + V = mk_var(Tree), + Type = erl_bif_types:type(erlang, build_stacktrace, 0), + State1 = state__store_conj(V, sub, Type, State), + {State1, V}; Other -> erlang:error({'Unsupported primop', Other}) end; 'receive' -> |