aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-02-05 17:30:19 +0100
committerHans Bolinder <[email protected]>2018-02-06 14:57:16 +0100
commit57406f28602b0207879f08311c7e36629fb9c0bf (patch)
tree9d8828dd8fe037354d830304f9cb42d2b9be4e77 /lib/dialyzer/src
parentb6d0807aebf676063ab522833ded99b2a7fb31c9 (diff)
downloadotp-57406f28602b0207879f08311c7e36629fb9c0bf.tar.gz
otp-57406f28602b0207879f08311c7e36629fb9c0bf.tar.bz2
otp-57406f28602b0207879f08311c7e36629fb9c0bf.zip
dialyzer: Assign a type to the primop build_stacktrace
Diffstat (limited to 'lib/dialyzer/src')
-rw-r--r--lib/dialyzer/src/dialyzer_dataflow.erl2
-rw-r--r--lib/dialyzer/src/dialyzer_typesig.erl6
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' ->