From 3b436e5ea9885d252fefef4dbd0302a713d11ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 30 Jan 2015 11:53:26 +0100 Subject: 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. --- lib/compiler/src/core_lint.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3