aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/erl_lint_SUITE.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-04-09 13:04:36 +0200
committerHans Bolinder <[email protected]>2014-04-29 09:17:01 +0200
commit8943276198034c6500ecbf4e513886ccf80fa056 (patch)
tree0d235c514ba52f937caaf62627788de46e2fd558 /lib/stdlib/test/erl_lint_SUITE.erl
parent4f0b3948eae361c04a3ed565a475a5d38f3c876d (diff)
downloadotp-8943276198034c6500ecbf4e513886ccf80fa056.tar.gz
otp-8943276198034c6500ecbf4e513886ccf80fa056.tar.bz2
otp-8943276198034c6500ecbf4e513886ccf80fa056.zip
Disallow '_' as type variable
"... when _ :: ..." used to compile, but Dialyzer crashed.
Diffstat (limited to 'lib/stdlib/test/erl_lint_SUITE.erl')
-rw-r--r--lib/stdlib/test/erl_lint_SUITE.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index 16bd88938a..6e5892714b 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -3720,7 +3720,18 @@ otp_11851(Config) when is_list(Config) ->
t()-> a.
">>,
[],
- {errors,[{5,erl_lint,{bad_callback,{lint_test,a,1}}}],[]}}
+ {errors,[{5,erl_lint,{bad_callback,{lint_test,a,1}}}],[]}},
+ {otp_11851_3,
+ <<"-export([a/1]).
+
+ -spec a(_A) -> boolean() when
+ _ :: atom(),
+ _A :: integer().
+
+ a(_) -> true.
+ ">>,
+ [],
+ {errors,[{4,erl_parse,"bad type variable"}],[]}}
],
[] = run(Config, Ts),
ok.