diff options
author | Hans Bolinder <[email protected]> | 2015-10-09 11:38:49 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2015-10-09 11:38:49 +0200 |
commit | 593383928d42ecf355ba51c70e5149a25d43d56d (patch) | |
tree | 9128fe70fa559aeed8d518782ea4f91c09be5ace /lib/hipe/cerl/erl_types.erl | |
parent | 7d88a6e607b0bc06a0d0cab0afbf81abfe9bef41 (diff) | |
parent | 13c39e40ff18ab1ab5ddeb0a5bde99658e3fab74 (diff) | |
download | otp-593383928d42ecf355ba51c70e5149a25d43d56d.tar.gz otp-593383928d42ecf355ba51c70e5149a25d43d56d.tar.bz2 otp-593383928d42ecf355ba51c70e5149a25d43d56d.zip |
Merge branch 'ks/dialyzer/undefined_record_fields/OTP-12719'
* ks/dialyzer/undefined_record_fields/OTP-12719:
Update Debugger
Update Diameter
Update Eunit
Update Inets
Update Reltool
Update SSL
Update Test Server
Update Syntax Tools
Update Tools
Update and cleanup HiPE records
Fix errors in dialyzer_{coordinator,worker} specs
Update Dialyzer
Update Compiler
stdlib: Refactor the supervisor module's state
Update Kernel and STDLIB
Take out automatic insertion of 'undefined' from typed record fields
Diffstat (limited to 'lib/hipe/cerl/erl_types.erl')
-rw-r--r-- | lib/hipe/cerl/erl_types.erl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl index cd2d2fe207..420d7e2a8f 100644 --- a/lib/hipe/cerl/erl_types.erl +++ b/lib/hipe/cerl/erl_types.erl @@ -3974,18 +3974,17 @@ record_to_string(Tag, [_|Fields], FieldNames, RecDict) -> FieldStrings = record_fields_to_string(Fields, FieldNames, RecDict, []), "#" ++ atom_to_string(Tag) ++ "{" ++ string:join(FieldStrings, ",") ++ "}". -record_fields_to_string([F|Fs], [{FName, _Abstr, _DefType}|FDefs], +record_fields_to_string([F|Fs], [{FName, _Abstr, DefType}|FDefs], RecDict, Acc) -> NewAcc = - case t_is_equal(F, t_any()) orelse t_is_any_atom('undefined', F) of + case + t_is_equal(F, t_any()) orelse + (t_is_any_atom('undefined', F) andalso + not t_is_none(t_inf(F, DefType))) + of true -> Acc; false -> StrFV = atom_to_string(FName) ++ "::" ++ t_to_string(F, RecDict), - %% ActualDefType = t_subtract(DefType, t_atom('undefined')), - %% Str = case t_is_any(ActualDefType) of - %% true -> StrFV; - %% false -> StrFV ++ "::" ++ t_to_string(ActualDefType, RecDict) - %% end, [StrFV|Acc] end, record_fields_to_string(Fs, FDefs, RecDict, NewAcc); |