aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_plt.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_plt.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_plt.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_plt.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/dialyzer/src/dialyzer_plt.erl b/lib/dialyzer/src/dialyzer_plt.erl
index 1bf30cf83b..511a17d577 100644
--- a/lib/dialyzer/src/dialyzer_plt.erl
+++ b/lib/dialyzer/src/dialyzer_plt.erl
@@ -144,6 +144,10 @@ delete_list(#plt{info = Info, types = Types,
-spec insert_contract_list(plt(), dialyzer_contracts:plt_contracts()) -> plt().
+insert_contract_list(#plt{contracts = Contracts} = PLT, List) ->
+ NewContracts = dict:merge(fun(_MFA, _Old, New) -> New end,
+ Contracts, dict:from_list(List)),
+ PLT#plt{contracts = NewContracts};
insert_contract_list(#mini_plt{contracts = Contracts} = PLT, List) ->
true = ets:insert(Contracts, List),
PLT.