[erlang-bugs] Compiler warning regression

Anthony Ramine <>
Wed Oct 30 16:39:06 CET 2013


Probably a regression caused by nox/fix-erl_lint-variable-usage. Should be easy to patch. 

-- 
Anthony Ramine

Le 30 oct. 2013 à 16:30, Simon Cornish <> a écrit :

> 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
> _______________________________________________
> erlang-bugs mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-bugs



More information about the erlang-bugs mailing list