aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-01-18 10:37:11 +0100
committerFredrik Gustafsson <[email protected]>2013-01-18 10:37:11 +0100
commit7bde9f1f97e771eb2ee31395224dad1daf3748c4 (patch)
tree5447d6d099852380a39f264760bf85c53412383f
parent750ecdea08fa5fa7e32b7f3019eed96c1699427e (diff)
parent25904f0e6ed034979c2686c6c08daf3ba231ebcc (diff)
downloadotp-7bde9f1f97e771eb2ee31395224dad1daf3748c4.tar.gz
otp-7bde9f1f97e771eb2ee31395224dad1daf3748c4.tar.bz2
otp-7bde9f1f97e771eb2ee31395224dad1daf3748c4.zip
Merge branch 'nox/compiler/forbid-locals-in-core-guards/OTP-10706'
-rw-r--r--lib/compiler/src/core_lint.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compiler/src/core_lint.erl b/lib/compiler/src/core_lint.erl
index b513a8965c..21296a8b66 100644
--- a/lib/compiler/src/core_lint.erl
+++ b/lib/compiler/src/core_lint.erl
@@ -247,7 +247,8 @@ gbody(E, Def, Rt, St0) ->
false -> St1
end.
-gexpr(#c_var{name=N}, Def, _Rt, St) -> expr_var(N, Def, St);
+gexpr(#c_var{name=N}, Def, _Rt, St) when is_atom(N); is_integer(N) ->
+ expr_var(N, Def, St);
gexpr(#c_literal{}, _Def, _Rt, St) -> St;
gexpr(#c_cons{hd=H,tl=T}, Def, _Rt, St) ->
gexpr_list([H,T], Def, St);