From 4c3418d26b8bb209aa46a2debd12e9f406738947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=B6m=C3=B6ri?= Date: Thu, 27 Dec 2018 00:00:14 +0100 Subject: Add literal character to erl_parse:abstract_type/0 type This is allowed since 19.3 (commit 6d238032) and documented since commit 744fb920. --- lib/stdlib/src/erl_parse.yrl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/stdlib') diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl index 9602f0bcd9..5880eb4536 100644 --- a/lib/stdlib/src/erl_parse.yrl +++ b/lib/stdlib/src/erl_parse.yrl @@ -928,6 +928,7 @@ Erlang code. [af_type_variable() | abstract_type()]}. % [V, T] -type af_singleton_integer_type() :: af_integer() + | af_character() | af_unary_op(af_singleton_integer_type()) | af_binary_op(af_singleton_integer_type()). -- cgit v1.2.3 From d05d5b5c680f486557936d81c91c060834275b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=B6m=C3=B6ri?= Date: Fri, 28 Dec 2018 21:16:24 +0100 Subject: Fix erl_parse:af_fun_type() `af_function_type()` already contains the `{'type', anno(), 'fun', ...}` tuple so it does not have to be wrapped again. --- lib/stdlib/src/erl_parse.yrl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/stdlib') diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl index 5880eb4536..760a49ed32 100644 --- a/lib/stdlib/src/erl_parse.yrl +++ b/lib/stdlib/src/erl_parse.yrl @@ -872,7 +872,7 @@ Erlang code. -type af_fun_type() :: {'type', anno(), 'fun', []} | {'type', anno(), 'fun', [{'type', anno(), 'any'} | abstract_type()]} - | {'type', anno(), 'fun', af_function_type()}. + | af_function_type(). -type af_integer_range_type() :: {'type', anno(), 'range', [af_singleton_integer_type()]}. -- cgit v1.2.3 From 52fdb19885ce9342e29a8c946c76222567a6605c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=B6m=C3=B6ri?= Date: Fri, 28 Dec 2018 21:31:22 +0100 Subject: Fix erl_parse:af_constraint() Add missing list wrapper. --- lib/stdlib/src/erl_parse.yrl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/stdlib') diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl index 760a49ed32..5fa9c4f75c 100644 --- a/lib/stdlib/src/erl_parse.yrl +++ b/lib/stdlib/src/erl_parse.yrl @@ -924,8 +924,8 @@ Erlang code. -type af_function_constraint() :: [af_constraint()]. -type af_constraint() :: {'type', anno(), 'constraint', - af_lit_atom('is_subtype'), - [af_type_variable() | abstract_type()]}. % [V, T] + [af_lit_atom('is_subtype') | + [af_type_variable() | abstract_type()]]}. % [IsSubtype, [V, T]] -type af_singleton_integer_type() :: af_integer() | af_character() -- cgit v1.2.3