aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/cerl_clauses.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compiler/src/cerl_clauses.erl')
-rw-r--r--lib/compiler/src/cerl_clauses.erl18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/compiler/src/cerl_clauses.erl b/lib/compiler/src/cerl_clauses.erl
index 99fa8dd9d5..76d70dcabf 100644
--- a/lib/compiler/src/cerl_clauses.erl
+++ b/lib/compiler/src/cerl_clauses.erl
@@ -354,6 +354,24 @@ match(P, E, Bs) ->
{false, Bs}
end
end;
+ map ->
+ %% The most we can do is to say "definitely no match" if a
+ %% binary pattern is matched against non-binary data.
+ case E of
+ any ->
+ {false, Bs};
+ _ ->
+ case type(E) of
+ literal ->
+ none;
+ cons ->
+ none;
+ tuple ->
+ none;
+ _ ->
+ {false, Bs}
+ end
+ end;
_ ->
match_1(P, E, Bs)
end.