diff options
author | Hans Bolinder <[email protected]> | 2017-01-10 10:52:38 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2017-01-10 10:52:38 +0100 |
commit | 448e8aca77dd29ed5b37d56f0700d24ac26a7243 (patch) | |
tree | 79c2ec78af77340ee0cdf27faab371720b20b20c /lib/stdlib/src | |
parent | c60394a8ef642f8533fa26b0bc3d1dcb217c8866 (diff) | |
parent | 99ed930f507868906953c6169a58c03df3e10901 (diff) | |
download | otp-448e8aca77dd29ed5b37d56f0700d24ac26a7243.tar.gz otp-448e8aca77dd29ed5b37d56f0700d24ac26a7243.tar.bz2 otp-448e8aca77dd29ed5b37d56f0700d24ac26a7243.zip |
Merge branch 'maint'
* maint:
stdlib: Allow characters in types and constant patterns
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/erl_eval.erl | 1 | ||||
-rw-r--r-- | lib/stdlib/src/erl_parse.yrl | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/stdlib/src/erl_eval.erl b/lib/stdlib/src/erl_eval.erl index 40a34aa30f..eafee346eb 100644 --- a/lib/stdlib/src/erl_eval.erl +++ b/lib/stdlib/src/erl_eval.erl @@ -1306,6 +1306,7 @@ partial_eval(Expr) -> ev_expr({op,_,Op,L,R}) -> erlang:Op(ev_expr(L), ev_expr(R)); ev_expr({op,_,Op,A}) -> erlang:Op(ev_expr(A)); ev_expr({integer,_,X}) -> X; +ev_expr({char,_,X}) -> X; ev_expr({float,_,X}) -> X; ev_expr({atom,_,X}) -> X; ev_expr({tuple,_,Es}) -> diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl index 9cd95705af..fb5d05ec8e 100644 --- a/lib/stdlib/src/erl_parse.yrl +++ b/lib/stdlib/src/erl_parse.yrl @@ -156,6 +156,7 @@ type -> '#' atom '{' field_types '}' : {type, ?anno('$1'), record, ['$2'|'$4']}. type -> binary_type : '$1'. type -> integer : '$1'. +type -> char : '$1'. type -> 'fun' '(' ')' : {type, ?anno('$1'), 'fun', []}. type -> 'fun' '(' fun_type_100 ')' : '$3'. |