aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/compiler/src/cerl_clauses.erl15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/compiler/src/cerl_clauses.erl b/lib/compiler/src/cerl_clauses.erl
index 5f111a5e05..bb0f998931 100644
--- a/lib/compiler/src/cerl_clauses.erl
+++ b/lib/compiler/src/cerl_clauses.erl
@@ -338,10 +338,19 @@ match(P, E, Bs) ->
if E =:= any ->
{false, Bs};
true ->
- case is_data(E) of
- true ->
+ case type(E) of
+ literal ->
+ case is_bitstring(concrete(E)) of
+ false ->
+ none;
+ true ->
+ {false, Bs}
+ end;
+ cons ->
none;
- false ->
+ tuple ->
+ none;
+ _ ->
{false, Bs}
end
end;