aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-01-30 11:53:26 +0100
committerBjörn Gustavsson <[email protected]>2015-02-12 13:14:36 +0100
commit3b436e5ea9885d252fefef4dbd0302a713d11ff7 (patch)
tree859f2f28b024f493ad6b811e9835de0b0387a1bb /lib/compiler/src
parent8e8a0daea3a50ce5db7e4b7fbbbc056ad3c35dd6 (diff)
downloadotp-3b436e5ea9885d252fefef4dbd0302a713d11ff7.tar.gz
otp-3b436e5ea9885d252fefef4dbd0302a713d11ff7.tar.bz2
otp-3b436e5ea9885d252fefef4dbd0302a713d11ff7.zip
core_lint: Eliminate call to core_lib:is_literal/1
Attributes must be literals. Since 1fcdcd50, both core_parse and v3_core guarantees all Core Erlang terms that may be represented as literals in fact are represented as literals. Therefore, we no longer need to call core_lib:is_literal/1, but can test for a #c_literal{} directly.
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/core_lint.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compiler/src/core_lint.erl b/lib/compiler/src/core_lint.erl
index c0e2bdaba0..f62b2bb0ba 100644
--- a/lib/compiler/src/core_lint.erl
+++ b/lib/compiler/src/core_lint.erl
@@ -173,7 +173,7 @@ check_exports(Es, St) ->
end.
check_attrs(As, St) ->
- case all(fun ({#c_literal{},V}) -> core_lib:is_literal(V);
+ case all(fun ({#c_literal{},#c_literal{}}) -> true;
(_) -> false
end, As) of
true -> St;