diff options
author | Hans Bolinder <[email protected]> | 2015-09-24 13:43:32 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2015-10-30 12:37:20 +0100 |
commit | 5066ac923c1dbaa90d63e39b52b60f883284a8ad (patch) | |
tree | 952d9373d2418345244e60bd33353bf3d99205fc /lib/dialyzer/test | |
parent | 95197d3dd5561908a9fe1081ee9908174fd79517 (diff) | |
download | otp-5066ac923c1dbaa90d63e39b52b60f883284a8ad.tar.gz otp-5066ac923c1dbaa90d63e39b52b60f883284a8ad.tar.bz2 otp-5066ac923c1dbaa90d63e39b52b60f883284a8ad.zip |
hipe/dialyzer: Remove functions from erl_bif_types
Diffstat (limited to 'lib/dialyzer/test')
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/results/bif1 | 3 | ||||
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/bif1/bif1.erl | 16 | ||||
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/bif1/bif1_adt.erl | 12 |
3 files changed, 31 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/results/bif1 b/lib/dialyzer/test/small_SUITE_data/results/bif1 new file mode 100644 index 0000000000..289b6f821f --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/results/bif1 @@ -0,0 +1,3 @@ + +bif1.erl:13: Function string_chars/0 has no local return +bif1.erl:16: The call string:chars(S::65,10,L2::bif1_adt:s()) contains an opaque term as 3rd argument when terms of different types are expected in these positions diff --git a/lib/dialyzer/test/small_SUITE_data/src/bif1/bif1.erl b/lib/dialyzer/test/small_SUITE_data/src/bif1/bif1.erl new file mode 100644 index 0000000000..bc746538d3 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/bif1/bif1.erl @@ -0,0 +1,16 @@ +-module(bif1). + +%% Other set of warnings due to removed of functions from +%% erl_bif_types. + +-export([ets_rename/0, string_chars/0]). + +ets_rename() -> + A = ets:new(fipp, []), + true = not is_atom(A), + ets:rename(A, fopp). % No warning + +string_chars() -> + L2 = bif1_adt:opaque_string(), + S = $A, + string:chars(S, 10, L2). % Warning diff --git a/lib/dialyzer/test/small_SUITE_data/src/bif1/bif1_adt.erl b/lib/dialyzer/test/small_SUITE_data/src/bif1/bif1_adt.erl new file mode 100644 index 0000000000..01b0bccc68 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/bif1/bif1_adt.erl @@ -0,0 +1,12 @@ +-module(bif1_adt). + +-export([opaque_string/0]). + +-export_type([s/0]). + +-opaque s() :: string(). + +-spec opaque_string() -> s(). + +opaque_string() -> + "string". |