diff options
author | Hans Bolinder <[email protected]> | 2017-01-10 15:05:24 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2017-01-10 15:05:24 +0100 |
commit | 712e7beec6b1192d5e7294a166a81a3561a39595 (patch) | |
tree | a2dbb826eb3fc80d614eae61b86973cfd4440c0a /lib/dialyzer | |
parent | 99ed930f507868906953c6169a58c03df3e10901 (diff) | |
download | otp-712e7beec6b1192d5e7294a166a81a3561a39595.tar.gz otp-712e7beec6b1192d5e7294a166a81a3561a39595.tar.bz2 otp-712e7beec6b1192d5e7294a166a81a3561a39595.zip |
stdlib: Correct signatures of functions in erl_parse
The signatures of erl_parse:anno_to_term/1 and
erl_parse:anno_from_term/1 are corrected. Using these function no
longer results in false Dialyzer warnings.
Diffstat (limited to 'lib/dialyzer')
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/anno.erl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/anno.erl b/lib/dialyzer/test/small_SUITE_data/src/anno.erl new file mode 100644 index 0000000000..70f1d42141 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/anno.erl @@ -0,0 +1,18 @@ +-module(anno). + +%% OTP-14131 + +-export([t1/0, t2/0, t3/0]). + +t1() -> + A = erl_parse:anno_from_term({attribute, 1, module, my_test}), + compile:forms([A], []). + +t2() -> + A = erl_parse:new_anno({attribute, 1, module, my_test}), + compile:forms([A], []). + +t3() -> + A = erl_parse:new_anno({attribute, 1, module, my_test}), + T = erl_parse:anno_to_term(A), + {attribute, 1, module, my_test} = T. |