[erlang-bugs] Compiler warning regression

Simon Cornish zl9d97p02@REDACTED
Wed Oct 30 16:30:22 CET 2013


Hi,

I think we have found a compiler bug in the R16 compiler.
In R16 there is no warning about an unused variable inside the try catch clause.

/Simon


-module(test).
-export([unused/0]).

unused() ->
    UnusedVar1 = unused1,
    try
    UnusedVar2 = unused2
    catch
    _:_ ->
        ok
    end,
    ok.


d71$ ERL_V=R12B-3 erlc test.erl
../test.erl:7: Warning: variable 'UnusedVar1' is unused
../test.erl:9: Warning: variable 'UnusedVar2' is unused

d71$ ERL_V=R16B02 erlc test.erl
test.erl:7: Warning: variable 'UnusedVar1' is unused



More information about the erlang-bugs mailing list