diff options
author | Luca Favatella <[email protected]> | 2015-09-26 13:34:16 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2016-01-26 09:11:46 +0100 |
commit | f79348f3838c67b1d22b3824e9c6a5b4f91e8395 (patch) | |
tree | 2292c20d2a234a5fdbb82904eda46bdd0f373fb7 /lib/typer/src | |
parent | 7dcecb535129bf9fbfddc08f639363aee3278810 (diff) | |
download | otp-f79348f3838c67b1d22b3824e9c6a5b4f91e8395.tar.gz otp-f79348f3838c67b1d22b3824e9c6a5b4f91e8395.tar.bz2 otp-f79348f3838c67b1d22b3824e9c6a5b4f91e8395.zip |
Clarify computation of exported types in Dialyzer
Superfluous usage of insert_temp_exported_types had been in since
6452b57. (Change in commit 8a3ea1f module dialyzer_analysis_callgraph
is a correct simplification and is not relevant.)
Diffstat (limited to 'lib/typer/src')
-rw-r--r-- | lib/typer/src/typer.erl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/typer/src/typer.erl b/lib/typer/src/typer.erl index 562530c868..5c82750a21 100644 --- a/lib/typer/src/typer.erl +++ b/lib/typer/src/typer.erl @@ -2,7 +2,7 @@ %%----------------------------------------------------------------------- %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2006-2015. All Rights Reserved. +%% Copyright Ericsson AB 2006-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -137,11 +137,14 @@ extract(#analysis{macros = Macros, NewCodeServer = try NewRecords = dialyzer_codeserver:get_temp_records(CodeServer1), + NewExpTypes = dialyzer_codeserver:get_temp_exported_types(CodeServer1), + case sets:size(NewExpTypes) of 0 -> ok end, OldRecords = dialyzer_plt:get_types(TrustPLT), % XXX change to the PLT? MergedRecords = dialyzer_utils:merge_records(NewRecords, OldRecords), CodeServer2 = dialyzer_codeserver:set_temp_records(MergedRecords, CodeServer1), - CodeServer3 = dialyzer_utils:process_record_remote_types(CodeServer2), - dialyzer_contracts:process_contract_remote_types(CodeServer3) + CodeServer3 = dialyzer_codeserver:finalize_exported_types(NewExpTypes, CodeServer2), + CodeServer4 = dialyzer_utils:process_record_remote_types(CodeServer3), + dialyzer_contracts:process_contract_remote_types(CodeServer4) catch throw:{error, ErrorMsg} -> compile_error(ErrorMsg) @@ -845,8 +848,7 @@ collect_info(Analysis) -> %% io:format("Merged Records ~p",[MergedRecords]), TmpCServer1 = dialyzer_codeserver:set_temp_records(MergedRecords, TmpCServer), TmpCServer2 = - dialyzer_codeserver:insert_temp_exported_types(MergedExpTypes, - TmpCServer1), + dialyzer_codeserver:finalize_exported_types(MergedExpTypes, TmpCServer1), TmpCServer3 = dialyzer_utils:process_record_remote_types(TmpCServer2), dialyzer_contracts:process_contract_remote_types(TmpCServer3) catch |