File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -52,4 +52,24 @@ def sign_in(conn, %{
5252 expect ( str ) . to include_elixir_syntax ( 'elixirUnusedVariable' , '_user' )
5353 expect ( str ) . to include_elixir_syntax ( 'elixirUnusedVariable' , '_claims' )
5454 end
55+
56+ it 'unused, in anonymous function, inline' do
57+ expect ( <<~EOF ) . to include_elixir_syntax ( 'elixirUnusedVariable' , '_unused' )
58+ fun = fn _unused -> false end
59+ EOF
60+ end
61+
62+ it 'unused, in anonymous function, multiple lines' do
63+ expect ( <<~EOF ) . to include_elixir_syntax ( 'elixirUnusedVariable' , '_unused' )
64+ fun = fn
65+ ([], _unused) -> true
66+ end
67+ EOF
68+ end
69+
70+ it 'unused, in pattern matching' do
71+ expect ( <<~EOF ) . to include_elixir_syntax ( 'elixirUnusedVariable' , '_unused' )
72+ _unused = false
73+ EOF
74+ end
5575end
You can’t perform that action at this time.
0 commit comments