aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-02-07 11:41:46 +0100
committerHans Bolinder <[email protected]>2018-02-07 11:41:46 +0100
commitddd9b35a529589edc46e04655fefba74dd2179f0 (patch)
tree370a4b36be6b82da331db06d3c852efacc79cc00 /lib/hipe
parent3cb3d5c1927e6235b0e51ba7ca31e2a3458fba01 (diff)
parent57406f28602b0207879f08311c7e36629fb9c0bf (diff)
downloadotp-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/hipe')
-rw-r--r--lib/hipe/cerl/erl_bif_types.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl
index 5fda857bf1..bfffb8db41 100644
--- a/lib/hipe/cerl/erl_bif_types.erl
+++ b/lib/hipe/cerl/erl_bif_types.erl
@@ -585,6 +585,13 @@ type(erlang, float, 1, Xs, Opaques) ->
%% Guard bif, needs to be here.
type(erlang, floor, 1, Xs, Opaques) ->
strict(erlang, floor, 1, Xs, fun (_) -> t_integer() end, Opaques);
+%% Primop, needs to be somewhere.
+type(erlang, build_stacktrace, 0, _, _Opaques) ->
+ t_list(t_tuple([t_module(),
+ t_atom(),
+ t_sup([t_arity(),t_list()]),
+ t_list(t_sup([t_tuple([t_atom('file'),t_string()]),
+ t_tuple([t_atom('line'),t_pos_integer()])]))]));
%% Guard bif, needs to be here.
type(erlang, hd, 1, Xs, Opaques) ->
strict(erlang, hd, 1, Xs, fun ([X]) -> t_cons_hd(X) end, Opaques);
@@ -2336,6 +2343,9 @@ arg_types(erlang, float, 1) ->
%% Guard bif, needs to be here.
arg_types(erlang, floor, 1) ->
[t_number()];
+%% Primop, needs to be somewhere.
+arg_types(erlang, build_stacktrace, 0) ->
+ [];
%% Guard bif, needs to be here.
arg_types(erlang, hd, 1) ->
[t_cons()];