aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/test/cover_SUITE_data
diff options
context:
space:
mode:
authorJosé Valim <[email protected]>2012-11-28 12:51:34 +0100
committerFredrik Gustafsson <[email protected]>2013-01-25 14:57:00 +0100
commit261880cfbebafddb61c728ed873f4e93107d9af9 (patch)
tree91f999d0924b3ec41e3fb486e34ab5fbcf9ad87e /lib/tools/test/cover_SUITE_data
parentf3fb48d42329d54b463e7434ff28bb51e4dde4dd (diff)
downloadotp-261880cfbebafddb61c728ed873f4e93107d9af9.tar.gz
otp-261880cfbebafddb61c728ed873f4e93107d9af9.tar.bz2
otp-261880cfbebafddb61c728ed873f4e93107d9af9.zip
Fix a bug in cover when used with no_auto_import
Cover was rewriting guard clauses as non-remote calls. That said, if a guard contains erlang:is_binary(Binary), Cover was incorrectly removing the erlang prefix which lead to errors if is_binary is not auto imported. This commit keeps the abstract format as it is.
Diffstat (limited to 'lib/tools/test/cover_SUITE_data')
-rw-r--r--lib/tools/test/cover_SUITE_data/compile_beam/v.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/tools/test/cover_SUITE_data/compile_beam/v.erl b/lib/tools/test/cover_SUITE_data/compile_beam/v.erl
index 007957297a..7fb0b08d40 100644
--- a/lib/tools/test/cover_SUITE_data/compile_beam/v.erl
+++ b/lib/tools/test/cover_SUITE_data/compile_beam/v.erl
@@ -1,6 +1,9 @@
-module(v).
-
--export([f/0]).
+-compile({ no_auto_import, [is_integer/1] }).
+-export([f/0,f/1]).
f() ->
ok.
+
+f(Number) when erlang:is_integer(Number) ->
+ Number.