diff options
author | Hans Bolinder <[email protected]> | 2015-12-15 08:55:56 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2015-12-15 08:55:56 +0100 |
commit | 995f437e6d4d9e1b42a3be1b181c9c52265c4274 (patch) | |
tree | cba28ce855c02795e43a4dba9eecd51fea03cacf /lib/stdlib/src/erl_parse.yrl | |
parent | 291f263dfa099bcb4022581b9cc3e4e9473aba2f (diff) | |
parent | 57a1eebddcbbc4f3f9734fb5cff8f9b40e1b2c2d (diff) | |
download | otp-995f437e6d4d9e1b42a3be1b181c9c52265c4274.tar.gz otp-995f437e6d4d9e1b42a3be1b181c9c52265c4274.tar.bz2 otp-995f437e6d4d9e1b42a3be1b181c9c52265c4274.zip |
Merge branch 'hb/stdlib/remove_old_type_syntax/OTP-11879'
* hb/stdlib/remove_old_type_syntax/OTP-11879:
stdlib: Add a comment about is_subtype(_, _) constraints
hipe: Use '::' for constraints
debugger: Use '::' for constraints
doc: Remove 'is_subtype' from Types and Function Specifications
dialyzer: Print constraints using the '::' syntax
stdlib: Remove undocumented function specification syntax
Diffstat (limited to 'lib/stdlib/src/erl_parse.yrl')
-rw-r--r-- | lib/stdlib/src/erl_parse.yrl | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl index ae42a8f0b1..e07ab2efc2 100644 --- a/lib/stdlib/src/erl_parse.yrl +++ b/lib/stdlib/src/erl_parse.yrl @@ -85,10 +85,6 @@ type_spec -> '(' spec_fun type_sigs ')' : {'$2', '$3'}. spec_fun -> atom : '$1'. spec_fun -> atom ':' atom : {'$1', '$3'}. -%% The following two are retained only for backwards compatibility; -%% they are not part of the EEP syntax and should be removed. -spec_fun -> atom '/' integer '::' : {'$1', '$3'}. -spec_fun -> atom ':' atom '/' integer '::' : {'$1', '$3', '$5'}. typed_attr_val -> expr ',' typed_record_fields : {typed_record, '$1', '$3'}. typed_attr_val -> expr '::' top_type : {type_def, '$1', '$3'}. @@ -634,14 +630,8 @@ build_type_spec({Kind,Aa}, {SpecFun, TypeSpecs}) {atom, _, Fun} -> {Fun, find_arity_from_specs(TypeSpecs)}; {{atom,_, Mod}, {atom,_, Fun}} -> - {Mod,Fun,find_arity_from_specs(TypeSpecs)}; - {{atom, _, Fun}, {integer, _, Arity}} -> - %% Old style spec. Allow this for now. - {Fun,Arity}; - {{atom,_, Mod}, {atom, _, Fun}, {integer, _, Arity}} -> - %% Old style spec. Allow this for now. - {Mod,Fun,Arity} - end, + {Mod,Fun,find_arity_from_specs(TypeSpecs)} + end, {attribute,Aa,Kind,{NewSpecFun, TypeSpecs}}. find_arity_from_specs([Spec|_]) -> |