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.erl25
1 files changed, 17 insertions, 8 deletions
diff --git a/lib/compiler/src/cerl_clauses.erl b/lib/compiler/src/cerl_clauses.erl
index 5f111a5e05..99fa8dd9d5 100644
--- a/lib/compiler/src/cerl_clauses.erl
+++ b/lib/compiler/src/cerl_clauses.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%% @doc Utility functions for Core Erlang case/receive clauses.
@@ -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;
+ tuple ->
none;
- false ->
+ _ ->
{false, Bs}
end
end;