aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-05-09 12:15:17 +0200
committerRaimo Niskanen <[email protected]>2010-05-20 12:20:51 +0200
commit953390b2ffdc2a47e138a034d78a6924d909b330 (patch)
treea045f543fb7bbc1e2346bb684ab5c416e8c9c20d
parentc9461bb19009804a2646ee81078dadaa4fd7294a (diff)
downloadotp-953390b2ffdc2a47e138a034d78a6924d909b330.tar.gz
otp-953390b2ffdc2a47e138a034d78a6924d909b330.tar.bz2
otp-953390b2ffdc2a47e138a034d78a6924d909b330.zip
v3_life: Remove clause that cannot match in match_fail/3
The clause that attempts to match a #k_literal{} where the value is an atom cannot possibly match, since single atoms are always encoded as #k_atom{}.
-rw-r--r--lib/compiler/src/v3_life.erl2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/compiler/src/v3_life.erl b/lib/compiler/src/v3_life.erl
index 9fda37530b..a7a4d4dc91 100644
--- a/lib/compiler/src/v3_life.erl
+++ b/lib/compiler/src/v3_life.erl
@@ -361,8 +361,6 @@ match_fail(#k_literal{anno=Anno,val={Atom,Val}}, I, A) when is_atom(Atom) ->
match_fail(#k_tuple{anno=Anno,es=[#k_atom{val=Atom},#k_literal{val=Val}]}, I, A);
match_fail(#k_literal{anno=Anno,val={Atom}}, I, A) when is_atom(Atom) ->
match_fail(#k_tuple{anno=Anno,es=[#k_atom{val=Atom}]}, I, A);
-match_fail(#k_literal{anno=Anno,val=Atom}, I, A) when is_atom(Atom) ->
- match_fail(#k_atom{anno=Anno,val=Atom}, I, A);
match_fail(#k_tuple{es=[#k_atom{val=function_clause}|As]}, I, A) ->
#l{ke={match_fail,{function_clause,literal_list(As, [])}},i=I,a=A};
match_fail(#k_tuple{es=[#k_atom{val=badmatch},Val]}, I, A) ->