Skip to content

v1.5.0-rc.0 anonymous variable in rescue clause generates compiler warning #6287

@ianrumford

Description

@ianrumford

Environment

Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.5.0-rc.0 (fa0de77)

Ubuntu Xenial 16.04

Current behavior

This test code

`defmodule Misc99 do

try do
  nil
rescue
  _any -> nil
end

end
`
generates the following compiler warning:

warning: the underscored variable "_any" is used after being set. A leading underscore indicates that the value of the variable should be ignored. If this is intended please rename the variable to remove the underscore
test/misc99_test.exs:6

Expected behaviour

No warning should be given. v1.4.5 does not generate the warning.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions