[erlang-questions] Can Pid be maps key ?

Hynek Vychodil vychodil.hynek@REDACTED
Mon May 18 08:24:49 CEST 2015


Variable map key syntax is not supported in R17. It is scheduled for R18.

On Mon, May 18, 2015 at 8:01 AM, 月忧茗 <yueyoum@REDACTED> wrote:

>
> Can Pid be maps key ?
>
> Build maps from #{} syntax, The error says Pid can not be key.
>
> Bug build with maps module, Pid can be key.
>
> 18> 18> Pid = self().
> <0.39.0>19> #{Pid => 1}.
> * 1: illegal use of variable 'Pid' in map20> 20> M1 = maps:from_list([{Pid, 1}]).
> #{<0.39.0> => 1}21> 21> #{Pid := V} = M1.
> * 2: illegal use of variable 'Pid' in map22>                  22> maps:get(Pid, M1).1
>
>
>
>
>
>
> --
> My GitHub
> https://github.com/yueyoum
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150518/adcb73b4/attachment.htm>


More information about the erlang-questions mailing list