aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/erl_lint_SUITE.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-04-09 12:40:34 +0200
committerHans Bolinder <[email protected]>2014-04-29 09:17:01 +0200
commit4f0b3948eae361c04a3ed565a475a5d38f3c876d (patch)
tree5c72b9bef3aa9cf70f8054fd4b04bb08906e1b48 /lib/stdlib/test/erl_lint_SUITE.erl
parent7ad783d431738c42fa9ce395fbc776916d927eb6 (diff)
downloadotp-4f0b3948eae361c04a3ed565a475a5d38f3c876d.tar.gz
otp-4f0b3948eae361c04a3ed565a475a5d38f3c876d.tar.bz2
otp-4f0b3948eae361c04a3ed565a475a5d38f3c876d.zip
Fix a -callback attribute bug
sys_pre_expand used to crash. There is no known reason to allow -callback attributes with explicit module.
Diffstat (limited to 'lib/stdlib/test/erl_lint_SUITE.erl')
-rw-r--r--lib/stdlib/test/erl_lint_SUITE.erl25
1 files changed, 20 insertions, 5 deletions
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index 580ff79584..16bd88938a 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -3248,7 +3248,7 @@ otp_11861(Conf) when is_list(Conf) ->
-callback b(_) -> atom().
">>,
[],
- {errors,[{3,erl_lint,{redefine_callback,{lint_test,b,1}}}],[]}},
+ {errors,[{3,erl_lint,{redefine_callback,{b,1}}}],[]}},
{otp_11861_17,
<<"
-behaviour(bad_behaviour2).
@@ -3664,11 +3664,11 @@ maps_type(Config) when is_list(Config) ->
ok.
otp_11851(doc) ->
- "OTP-11851: More atoms can be used as type names.";
+ "OTP-11851: More atoms can be used as type names + bug fixes.";
otp_11851(Config) when is_list(Config) ->
Ts = [
- {otp_11851,
- <<"
+ {otp_11851_1,
+ <<"-export([t/0]).
-type range(A, B) :: A | B.
-type union(A) :: A.
@@ -3705,7 +3705,22 @@ otp_11851(Config) when is_list(Config) ->
a.
">>,
[],
- []}
+ []},
+ {otp_11851_2,
+ <<"-export([a/1, b/1, t/0]).
+
+ -callback b(_) -> integer().
+
+ -callback ?MODULE:a(_) -> integer().
+
+ a(_) -> 3.
+
+ b(_) -> a.
+
+ t()-> a.
+ ">>,
+ [],
+ {errors,[{5,erl_lint,{bad_callback,{lint_test,a,1}}}],[]}}
],
[] = run(Config, Ts),
ok.