[erlang-bugs] Warning shows the wrong operator when useless operator is inside a useless contruction

José Valim jose.valim@REDACTED
Sat Jul 19 18:11:13 CEST 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140719/04095dd9/attachment.htm>


More information about the erlang-bugs mailing list