<div dir="ltr">I would like to clarify.<div><br></div><div style>Using non-values as keys in Maps will not work, it is a known current limitation.</div><div style><br></div><div style>A negative integer is not a value from the compilers perspective, it is a unary *expression*. The same goes for using a plus sign in front of integers.</div>
<div style><br></div><div style>This will be fixed when expressions are allowed.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-30 16:09 GMT+02:00 Björn-Egil Dahlberg <span dir="ltr"><<a href="mailto:egil@erlang.org" target="_blank">egil@erlang.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Yep, the linter is a bit harsh here.
It's suppose to deny all non-value keys, which technically is what
it does here .. but it is a bit harsh.<br>
<br>
I'll look at it.<br>
<br>
// Björn-Egil<div><div class="h5"><br>
<br>
On 2014-04-30 15:32, Alexey Lebedeff wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>As soon as I add unary minus anywhere in a map key, it
breaks with "illegal map key" message:</div>
<div><br>
</div>
<div>Erlang/OTP 17 [erts-6.0] [source-07b8f44] [64-bit]
[smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]<br>
</div>
<div>Eshell V6.0 (abort with ^G)<br>
</div>
<div>3> #{ -1 => 1}. <br>
</div>
<div>* 1: illegal map key</div>
<div>4> #{ {a, -1} => 1 }.</div>
<div>* 1: illegal map key</div>
<div><br>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
erlang-bugs mailing list
<a href="mailto:erlang-bugs@erlang.org" target="_blank">erlang-bugs@erlang.org</a>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><br>
<br></blockquote></div><br></div>