Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hb/dialyzer/fix_opaque_types/OTP-12493'
Browse files Browse the repository at this point in the history
* hb/dialyzer/fix_opaque_types/OTP-12493:
  dialyzer: Correction of last commit
  • Loading branch information
uabboli committed Jun 22, 2015
2 parents 29bbf6a + e530261 commit 2be7b33
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/dialyzer/src/dialyzer_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 2be7b33

Please sign in to comment.