diff options
author | Hans Bolinder <[email protected]> | 2018-05-24 12:21:21 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2018-05-25 09:46:47 +0200 |
commit | 324fc38bc442460f871f3ae002dd853415ae9e51 (patch) | |
tree | 26ea1179da346c7954a6064b05460c2eb7cbec0e /lib/dialyzer/src/typer.erl | |
parent | 4f91c8a34f4cc2c728a63e8d218566b3b3795b10 (diff) | |
download | otp-324fc38bc442460f871f3ae002dd853415ae9e51.tar.gz otp-324fc38bc442460f871f3ae002dd853415ae9e51.tar.bz2 otp-324fc38bc442460f871f3ae002dd853415ae9e51.zip |
dialyzer: Refine the test for overspecified functions
The -Woverspecs (-Wspecdiffs) option generates warnings in a few more
cases. The refinement is analogous to the test that -Wunderspecs
already does: it checks if the contract has nothing in common with
some element (see erl_types:t_elements/1) of the success typing.
Diffstat (limited to 'lib/dialyzer/src/typer.erl')
-rw-r--r-- | lib/dialyzer/src/typer.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dialyzer/src/typer.erl b/lib/dialyzer/src/typer.erl index 9d3d9ce438..4b99f5f72e 100644 --- a/lib/dialyzer/src/typer.erl +++ b/lib/dialyzer/src/typer.erl @@ -401,7 +401,7 @@ get_type({{M, F, A} = MFA, Range, Arg}, CodeServer, Records) -> Sig = erl_types:t_fun(Arg, Range), case dialyzer_contracts:check_contract(Contract, Sig) of ok -> {{F, A}, {contract, Contract}}; - {error, {extra_range, _, _}} -> + {range_warnings, _} -> {{F, A}, {contract, Contract}}; {error, {overlapping_contract, []}} -> {{F, A}, {contract, Contract}}; |