iex(3)> if true do
...(3)> else
...(3)> :ok
...(3)> end
nil
iex(4)> if false do
...(4)> :ok
...(4)> else
...(4)> end
nil
iex(5)> if :anything do
...(5)> else
...(5)> end
nil
iex(6)>--
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 elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/81ee6358-695b-493d-aaf7-f310245943b6o%40googlegroups.com.
It can't error out on compilation because it would be a breaking change. However, personally I'm not against a compilation warning here, but there's a chance we decided to not emit that for a reason that I can't recall right now 😅Andrea
On Wed, 24 Jun 2020 at 13:19, Mário Guimarães <mario.lui...@gmail.com> wrote:
Hello,I just observed the following casesiex(3)> if true do
...(3)> else
...(3)> :ok
...(3)> end
nil
iex(4)> if false do
...(4)> :ok
...(4)> else
...(4)> end
nil
iex(5)> if :anything do
...(5)> else
...(5)> end
nil
iex(6)>Should't they give a compilation error instead due to the empty blocks?Not only these cases are somewhat harder to read, but it seems that something is missing ...Thanks--
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 elixir-l...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAM9Rf%2BJfB_3yzRMw8GU_m_wsVWL9pP1Xc0Em-1pLi3BMCodGCw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAK6%2BgZLfj4yty4dM9kx8epZCw7u%3DSz5PK6%2B%3D627WWBtfVDFZZQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BS8EQXfwMFadFV5AU-2PMtUJo0FA1jVAuHyZmvRPmznA%40mail.gmail.com.