[erlang-questions] Strange problems with modifying records with matched maps on 17.4

Sergej Jurečko sergej.jurecko@REDACTED
Tue Mar 24 12:25:57 CET 2015


Yes this is likely the same bug that I reported in february:
http://erlang.org/pipermail/erlang-bugs/2015-February/004768.html


Sergej

On Tue, Mar 24, 2015 at 12:21 PM, Max Lapshin <max.lapshin@REDACTED> wrote:

> https://gist.github.com/maxlapshin/a95d8a27ce93221d883a
>
> when I match map in record:
>
> modify(#r1{map_data = #{count := Cnt} = M}=R1) ->
>
> I get badarg when modify record in the end of function.
>
> I've attached two files looking similar in the gist.
>
>
>
>
> When I launch first, I get badarg with the line of function header:
>
> erl -s map_test1 main
>
> Erlang/OTP 17 [erts-6.3] [source] [64-bit] [smp:4:4] [ds:4:4:10]
> [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
>
> Created: {r1,#{count => 1},0}
>
> {"init terminating in
> do_boot",{badarg,[{map_test1,modify,1,[{file,"map_test1.erl"},{line,11}]},{map_test1,main,0,[{file,"map_test1.erl"},{line,8}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
>
>
> when I launch second, it works (but makes useless work).
>
>
> Is it a known bug? Or maybe it is not a bug, but just my misunderstanding?
>
>
>
>
> _______________________________________________
> 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/20150324/2552832f/attachment.htm>


More information about the erlang-questions mailing list