[erlang-bugs] Dialyzer fails to detect unused variables in R16B03
Shayan Pooya
shayan@REDACTED
Wed May 21 17:25:08 CEST 2014
That is right. Here is a minimal code that emits a warning in R15B03 but
not in later versions:
-module(warning_test).
-export([start/0]).
start() ->
try case recv() of
{hello, W} -> io:format("hello");
_ -> ok
end
catch K:V ->
io:format("issue: ~p ~p", [K, V])
end.
recv() ->
{hello, world}.
On Wed, May 21, 2014 at 10:35 AM, Kostis Sagonas <kostis@REDACTED> wrote:
> On 05/21/2014 03:33 PM, Shayan Pooya wrote:
>
>> Hello,
>>
>> In this piece of code, dialyzer fails to detect unused variable RState:
>> https://github.com/pooya/disco/blob/dialyzer_bug/
>> master/src/disco_worker.erl#L235
>>
>> (The code should be changed to use _ instead of RState, but I left it
>> like this to report this issue).
>>
>> Erlang versions prior to R16B03 seem to correctly detect and report this
>> issue:
>> https://travis-ci.org/pooya/disco/builds/25693989
>>
>> Therefore, this seem to be an issue in dialyzer which is also present in
>> Erlang 17.0
>>
>
> This is bit of a strange report since dialyzer does not really detect
> unused variables (and never has). It's the Erlang compiler/linter that
> does this.
>
> Kostis
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140521/f1e2d02e/attachment.htm>
More information about the erlang-bugs
mailing list