aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_lint.erl
diff options
context:
space:
mode:
authorAleksei Magusev <[email protected]>2015-10-07 22:39:35 +0200
committerZandra <[email protected]>2015-11-27 11:52:28 +0100
commitc7c27a608e219d7aa2ecd20203632095af94da8a (patch)
tree930087012395b343a439d364a15ed5233737866d /lib/stdlib/src/erl_lint.erl
parent29f453a3b2af49cd8f2052959262fc3be8971c46 (diff)
downloadotp-c7c27a608e219d7aa2ecd20203632095af94da8a.tar.gz
otp-c7c27a608e219d7aa2ecd20203632095af94da8a.tar.bz2
otp-c7c27a608e219d7aa2ecd20203632095af94da8a.zip
Forbid bytes modifier for unsized part of binary generator
This type modifier was missed in 90efeaf21147505b1e8207822e606027f94183cc.
Diffstat (limited to 'lib/stdlib/src/erl_lint.erl')
-rw-r--r--lib/stdlib/src/erl_lint.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index a5f0e7dbd3..69eff615b4 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -3189,8 +3189,8 @@ handle_generator(P,E,Vt,Uvt,St0) ->
handle_bitstring_gen_pat({bin,_,Segments=[_|_]},St) ->
case lists:last(Segments) of
{bin_element,Line,{var,_,_},default,Flags} when is_list(Flags) ->
- case member(binary, Flags) orelse member(bits, Flags)
- orelse member(bitstring, Flags) of
+ case member(binary, Flags) orelse member(bytes, Flags)
+ orelse member(bits, Flags) orelse member(bitstring, Flags) of
true ->
add_error(Line, unsized_binary_in_bin_gen_pattern, St);
false ->