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/stdlib/src/erl_parse.yrl | |
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/stdlib/src/erl_parse.yrl')
-rw-r--r-- | lib/stdlib/src/erl_parse.yrl | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl index 206b0c6e7b..ae42a8f0b1 100644 --- a/lib/stdlib/src/erl_parse.yrl +++ b/lib/stdlib/src/erl_parse.yrl @@ -790,31 +790,11 @@ record_fields([{match,_Am,{atom,Aa,A},Expr}|Fields]) -> [{record_field,Aa,{atom,Aa,A},Expr}|record_fields(Fields)]; record_fields([{typed,Expr,TypeInfo}|Fields]) -> [Field] = record_fields([Expr]), - TypeInfo1 = - case Expr of - {match, _, _, _} -> TypeInfo; %% If we have an initializer. - {atom, Aa, _} -> - case has_undefined(TypeInfo) of - false -> - lift_unions(abstract2(undefined, Aa), TypeInfo); - true -> - TypeInfo - end - end, - [{typed_record_field,Field,TypeInfo1}|record_fields(Fields)]; + [{typed_record_field,Field,TypeInfo}|record_fields(Fields)]; record_fields([Other|_Fields]) -> ret_err(?anno(Other), "bad record field"); record_fields([]) -> []. -has_undefined({atom,_,undefined}) -> - true; -has_undefined({ann_type,_,[_,T]}) -> - has_undefined(T); -has_undefined({type,_,union,Ts}) -> - lists:any(fun has_undefined/1, Ts); -has_undefined(_) -> - false. - term(Expr) -> try normalise(Expr) catch _:_R -> ret_err(?anno(Expr), "bad attribute") |