diff options
author | Hans Bolinder <[email protected]> | 2017-01-16 13:15:55 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2017-02-03 08:58:00 +0100 |
commit | e917ae0da957a8b151df54e2f1940fded8d21ad1 (patch) | |
tree | a9fdf36a9dc04bb012889105736ccbb730b63794 /lib/typer | |
parent | 5cd1994b89faa27657e2b0bb7ef026124acdff95 (diff) | |
download | otp-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/typer')
-rw-r--r-- | lib/typer/src/typer.erl | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/typer/src/typer.erl b/lib/typer/src/typer.erl index 584c8001f1..18c4fe902d 100644 --- a/lib/typer/src/typer.erl +++ b/lib/typer/src/typer.erl @@ -142,16 +142,9 @@ extract(#analysis{macros = Macros, compile_error(ErrorMsg) end, %% Create TrustPLT - Contracts = dialyzer_codeserver:get_contracts(NewCodeServer), - Modules = dict:fetch_keys(Contracts), - FoldFun = - fun(Module, TmpPlt) -> - {ok, ModuleContracts} = dict:find(Module, Contracts), - SpecList = [{MFA, Contract} - || {MFA, {_FileLine, Contract}} <- maps:to_list(ModuleContracts)], - dialyzer_plt:insert_contract_list(TmpPlt, SpecList) - end, - NewTrustPLT = lists:foldl(FoldFun, TrustPLT, Modules), + ContractsDict = dialyzer_codeserver:get_contracts(NewCodeServer), + Contracts = orddict:from_list(dict:to_list(ContractsDict)), + NewTrustPLT = dialyzer_plt:insert_contract_list(TrustPLT, Contracts), Analysis#analysis{trust_plt = NewTrustPLT}. %%-------------------------------------------------------------------- |