Warning shows the wrong operator when useless operator is inside a useless contruction

José Valim <[email protected]>
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <CAGnRm4+HZzgdz1bwKHxMvOey91WSr0s0Y1gdAAg64jgisCxEYg@mail.gmail.com>
Given the following code:

-module(foo).
-compile(export_all).

bar() ->
  [{foo, hello:world() == bar}],
  ok.


When compiled, it reports:

foo.erl:5: Warning: a term is constructed, but never used
foo.erl:5: Warning: use of operator '=:=' has no effect


The second warning is wrong. It must be refer to the operator '==' and not
'=:='.

*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Lead Developer

_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.