aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_codeserver.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-01-16 13:15:55 +0100
committerHans Bolinder <[email protected]>2017-02-03 08:58:00 +0100
commite917ae0da957a8b151df54e2f1940fded8d21ad1 (patch)
treea9fdf36a9dc04bb012889105736ccbb730b63794 /lib/dialyzer/src/dialyzer_codeserver.erl
parent5cd1994b89faa27657e2b0bb7ef026124acdff95 (diff)
downloadotp-e917ae0da957a8b151df54e2f1940fded8d21ad1.tar.gz
otp-e917ae0da957a8b151df54e2f1940fded8d21ad1.tar.bz2
otp-e917ae0da957a8b151df54e2f1940fded8d21ad1.zip
typer: Fix a bug regarding the -T option
The -T option has not been working for a long time.
Diffstat (limited to 'lib/dialyzer/src/dialyzer_codeserver.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_codeserver.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/dialyzer/src/dialyzer_codeserver.erl b/lib/dialyzer/src/dialyzer_codeserver.erl
index aa779e0e39..e15569388e 100644
--- a/lib/dialyzer/src/dialyzer_codeserver.erl
+++ b/lib/dialyzer/src/dialyzer_codeserver.erl
@@ -72,7 +72,6 @@
-type mod_records() :: erl_types:mod_records().
-type contracts() :: #{mfa() => dialyzer_contracts:file_contract()}.
--type mod_contracts() :: dict:dict(module(), contracts()).
%% A property-list of data compiled from -compile and -dialyzer attributes.
-type meta_info() :: [{{'nowarn_function' | dial_warn_tag()},
@@ -346,10 +345,13 @@ lookup_meta_info(MorMFA, #codeserver{fun_meta_info = FunMetaInfo}) ->
{ok, PropList} -> PropList
end.
--spec get_contracts(codeserver()) -> mod_contracts().
+-spec get_contracts(codeserver()) ->
+ dict:dict(mfa(), dialyzer_contracts:file_contract()).
get_contracts(#codeserver{contracts = ContDict}) ->
- ets_dict_to_dict(ContDict).
+ dict:filter(fun({_M, _F, _A}, _) -> true;
+ (_, _) -> false
+ end, ets_dict_to_dict(ContDict)).
-spec get_callbacks(codeserver()) -> list().