https://github.com/elixir-lang/elixir/issues/4957

On Thu, Jul 7, 2016 at 4:31 PM, José Valim <[email protected]>
wrote:

> Accidental omission. Please open up an issue. :)
>
>
>
> *José Valim*
> www.plataformatec.com.br
> Skype: jv.ptec
> Founder and Director of R&D
>
> On Thu, Jul 7, 2016 at 3:30 PM, Alexei Sholik <[email protected]>
> wrote:
>
>> Trying to compile the following piece of code
>>
>> with :ok <- {:error, :foo} do
>>   :ok
>> else
>>   {:error, reason} when reason in [:foo, :bar] ->
>>     :some_error
>>   {:error, _} ->
>>     :generic_error
>> end
>>
>>
>> results in this error
>>
>> ** (CompileError) iex:1: cannot invoke local when/2 inside match, called
>> as: {:error, reason} when :erlang.or(:erlang.=:=(reason, :bar),
>> :erlang.=:=(reason, :foo))
>>
>>
>> I wonder if there's a specific reason for not supporting everything the
>> 'case' expression supports in the 'else' clause? It looks like an
>> accidental omission to me.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "elixir-lang-core" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elixir-lang-core/CAAPY6eMv0%2BZ1_jiJmjTBC2-zn3n7SZ13%2BYnM9-WhyARFLA44Ow%40mail.gmail.com
>> <https://groups.google.com/d/msgid/elixir-lang-core/CAAPY6eMv0%2BZ1_jiJmjTBC2-zn3n7SZ13%2BYnM9-WhyARFLA44Ow%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4J6ktWrt-zpbGpop_B%2Bpf797m05RE9hw%3DsOaX93ZZFi3g%40mail.gmail.com
> <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4J6ktWrt-zpbGpop_B%2Bpf797m05RE9hw%3DsOaX93ZZFi3g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAAPY6eNv%2BZVG3OHz54Vv_bAFWCSE4%2B5og%3Dt6m111b52gd3a-dA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to