aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-01-09 12:12:14 +0100
committerHans Bolinder <[email protected]>2018-01-09 12:12:14 +0100
commitfbb7474e654225ad362168d08118c163976ad450 (patch)
tree872d7ef95e85d5d3c1fb9800092f95c1b1577e25 /lib/dialyzer/test
parentf5354ae34d9a05f8d9a207191baf4b7d5c7ab9d6 (diff)
parent34a9e40405cef0c4b4606df63f31716214b8b44d (diff)
downloadotp-fbb7474e654225ad362168d08118c163976ad450.tar.gz
otp-fbb7474e654225ad362168d08118c163976ad450.tar.bz2
otp-fbb7474e654225ad362168d08118c163976ad450.zip
Merge branch 'maint'
* maint: dialyzer: Correct handling of erlang:abs/1
Diffstat (limited to 'lib/dialyzer/test')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/abs.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/abs.erl b/lib/dialyzer/test/small_SUITE_data/src/abs.erl
index 251e24cdfc..0e38c3dbb7 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/abs.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/abs.erl
@@ -5,7 +5,7 @@
-export([t/0]).
t() ->
- Fs = [fun i1/0, fun i2/0, fun i3/0, fun i4/0, fun f1/0],
+ Fs = [fun i1/0, fun i2/0, fun i3/0, fun i4/0, fun f1/0, fun erl_551/0],
_ = [catch F() || F <- Fs],
ok.
@@ -60,6 +60,13 @@ f1() ->
f1(A) ->
abs(A).
+erl_551() ->
+ accept(9),
+ accept(-3).
+
+accept(Number) when abs(Number) >= 8 -> first;
+accept(_Number) -> second.
+
-spec int() -> integer().
int() ->