aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2015-06-20 18:04:12 +0200
committerHans Bolinder <[email protected]>2015-06-22 08:32:41 +0200
commite530261edd7bc41856eefa128c2c28c0bc2f4cd6 (patch)
tree9ca2a747e93cd6113704223c13f3767e5706eac4 /lib
parent29bbf6a23a13d3e5956e77e7298515e85170d52a (diff)
downloadotp-e530261edd7bc41856eefa128c2c28c0bc2f4cd6.tar.gz
otp-e530261edd7bc41856eefa128c2c28c0bc2f4cd6.tar.bz2
otp-e530261edd7bc41856eefa128c2c28c0bc2f4cd6.zip
dialyzer: Correction of last commit
Diffstat (limited to 'lib')
-rw-r--r--lib/dialyzer/src/dialyzer_utils.erl15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/dialyzer/src/dialyzer_utils.erl b/lib/dialyzer/src/dialyzer_utils.erl
index 62ffa9413a..4227a646d4 100644
--- a/lib/dialyzer/src/dialyzer_utils.erl
+++ b/lib/dialyzer/src/dialyzer_utils.erl
@@ -325,16 +325,13 @@ process_record_remote_types(CServer) ->
CServer1 = dialyzer_codeserver:finalize_records(NewRecords, CServer),
dialyzer_codeserver:finalize_exported_types(TempExpTypes, CServer1).
+%% erl_types:t_from_form() substitutes the declaration of opaque types
+%% for the expanded type in some cases. To make sure the initial type,
+%% any(), is not used, the expansion is done twice.
+%% XXX: Recursive opaque types are not handled well.
process_opaque_types0(TempRecords0, TempExpTypes) ->
- TempRecords = process_opaque_types(TempRecords0, TempExpTypes),
- L0 = lists:keysort(1, dict:to_list(TempRecords0)),
- L1 = lists:keysort(1, dict:to_list(TempRecords)),
- if
- L0 =:= L1 ->
- TempRecords;
- true ->
- process_opaque_types0(TempRecords, TempExpTypes)
- end.
+ TempRecords1 = process_opaque_types(TempRecords0, TempExpTypes),
+ process_opaque_types(TempRecords1, TempExpTypes).
process_opaque_types(TempRecords, TempExpTypes) ->
ModuleFun =