[erlang-bugs] Regression on match in 17.0-rc1
Anthony Ramine
n.oxyde@REDACTED
Tue Feb 4 01:05:16 CET 2014
The problem comes from cerl_clauses. The more I look at it, the more I think this module shouldn’t be used like this.
--
Anthony Ramine
Le 3 févr. 2014 à 20:19, Anthony Ramine <n.oxyde@REDACTED> a écrit :
> Smallest Core sample:
>
> module 'test' ['main'/1]
> attributes []
> 'main'/1 =
> %% Line 6
> fun (_cor0) ->
> case call 'io':'format' ([102|[110]]) of
> <Y = X> when 'true' ->
> Y
> end
> end
>
> Running this through sys_core_fold triggers the bug.
>
> --
> Anthony Ramine
>
> Le 3 févr. 2014 à 19:54, Anthony Ramine <n.oxyde@REDACTED> a écrit :
>
>> Bug is in sys_core_fold. Culprit is probably e12b7d5331c58b41db06cadfa4af75b78b62a2b1.
>>
>> --
>> Anthony Ramine
>>
>> Le 3 févr. 2014 à 19:34, José Valim <jose.valim@REDACTED> a écrit :
>>
>>> There is a regression in 17.0-rc1. The following code will execute io:format/2 twice:
>>>
>>> -module(test).
>>> -export([test/0]).
>>>
>>> test() ->
>>> X = Y = io:format(<<"foo~n">>),
>>> X,
>>> Y.
>>>
>>> I ran it with:
>>>
>>> $ erlc test.erl
>>> $ erl -s test test
>>>
>>> Above is the minimum test case extracted from a more complex expression where I matched against a record:
>>>
>>> Value = #elixir_env{} = expr()
>>>
>>> Thank you,
>>>
>>> José Valim
>>> www.plataformatec.com.br
>>> Skype: jv.ptec
>>> Founder and Lead Developer
>>> _______________________________________________
>>> erlang-bugs mailing list
>>> erlang-bugs@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-bugs
>>
>
More information about the erlang-bugs
mailing list