diff options
author | Hans Bolinder <[email protected]> | 2019-04-24 09:52:54 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2019-04-24 15:23:29 +0200 |
commit | 6d9d4af8725f26972481b2e997c54ee5b3eafb29 (patch) | |
tree | 57942b9705ea269315df5bcd6ef1555ba7051bae /lib/dialyzer/test | |
parent | 5b56ecbe12493a1ff6a0e975a65cefd09005cecd (diff) | |
download | otp-6d9d4af8725f26972481b2e997c54ee5b3eafb29.tar.gz otp-6d9d4af8725f26972481b2e997c54ee5b3eafb29.tar.bz2 otp-6d9d4af8725f26972481b2e997c54ee5b3eafb29.zip |
dialyzer: Improve the warning tagged 'fun_app_args'
The mismatching argument positions are included.
Diffstat (limited to 'lib/dialyzer/test')
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/results/fun_app_args | 3 | ||||
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/fun_app_args.erl | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/results/fun_app_args b/lib/dialyzer/test/small_SUITE_data/results/fun_app_args new file mode 100644 index 0000000000..ac153a6fb2 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/results/fun_app_args @@ -0,0 +1,3 @@ + +fun_app_args.erl:12: Fun application with arguments ('b',[]) will fail since the function has type 'c' | fun(('a',[]) -> any()), which differs in the 1st argument +fun_app_args.erl:12: The created fun has no local return diff --git a/lib/dialyzer/test/small_SUITE_data/src/fun_app_args.erl b/lib/dialyzer/test/small_SUITE_data/src/fun_app_args.erl new file mode 100644 index 0000000000..b4409bc550 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/fun_app_args.erl @@ -0,0 +1,12 @@ +-module(fun_app_args). + +-export([t/1]). + +-type ft() :: fun((a, []) -> any()). + +-record(r, { + h = c :: c | ft() +}). + +t(#r{h = H}) -> + fun(_) -> (H)(b, []) end. |