aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2015-06-22 08:41:58 +0200
committerHans Bolinder <[email protected]>2015-06-22 08:41:58 +0200
commit2be7b33f26fc950c2f807e1f9fbc19fde83facd0 (patch)
tree9ca2a747e93cd6113704223c13f3767e5706eac4
parent29bbf6a23a13d3e5956e77e7298515e85170d52a (diff)
parente530261edd7bc41856eefa128c2c28c0bc2f4cd6 (diff)
downloadotp-2be7b33f26fc950c2f807e1f9fbc19fde83facd0.tar.gz
otp-2be7b33f26fc950c2f807e1f9fbc19fde83facd0.tar.bz2
otp-2be7b33f26fc950c2f807e1f9fbc19fde83facd0.zip
Merge branch 'hb/dialyzer/fix_opaque_types/OTP-12493'
* hb/dialyzer/fix_opaque_types/OTP-12493: dialyzer: Correction of last commit
-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 =