{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/3946","labels_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3946/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3946/comments","events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3946/events","html_url":"https://github.com/elixir-lang/elixir/issues/3946","id":115997904,"number":3946,"title":"`try`, `case`, `cond` do not work with the short form \", do: \"","user":{"login":"eksperimental","id":9133420,"avatar_url":"https://avatars.githubusercontent.com/u/9133420?v=3","gravatar_id":"","url":"https://api.github.com/users/eksperimental","html_url":"https://github.com/eksperimental","followers_url":"https://api.github.com/users/eksperimental/followers","following_url":"https://api.github.com/users/eksperimental/following{/other_user}","gists_url":"https://api.github.com/users/eksperimental/gists{/gist_id}","starred_url":"https://api.github.com/users/eksperimental/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eksperimental/subscriptions","organizations_url":"https://api.github.com/users/eksperimental/orgs","repos_url":"https://api.github.com/users/eksperimental/repos","events_url":"https://api.github.com/users/eksperimental/events{/privacy}","received_events_url":"https://api.github.com/users/eksperimental/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-10T00:20:35Z","updated_at":"2015-11-10T00:27:49Z","closed_at":null,"body":"while `if ... do .. else ...  end` work in the short for of `if ... , do: ..., else: ....`\r\n```elixir\r\niex(62)> if true do (IO.puts :ok; true); else false end\r\nok\r\ntrue\r\niex(61)> if true, do: (IO.puts :ok; true), else: false                                     \r\nok\r\ntrue\r\n```\r\n\r\n`try`, `case`, `cond` do not work\r\n\r\n```elixir\r\niex> try do UndefinedModule.undefined_function rescue UndefinedFunctionError -> nil end\r\nnil\r\niex> try, do: UndefinedModule.undefined_function, rescue: UndefinedFunctionError -> nil\r\n** (SyntaxError) iex: syntax error before: ','\r\n\r\niex> case :true do  _ -> :true end\r\ntrue\r\niex> case :true, do:  _ -> :true\r\n\r\niex> cond do true -> :true end\r\ntrue\r\niex> cond, do: true -> :true               \r\n** (SyntaxError) iex: syntax error before: ','\r\n```\r\n\r\nNote: I haven't tested `receive`"},"comment":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments/155243783","html_url":"https://github.com/elixir-lang/elixir/issues/3946#issuecomment-155243783","issue_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3946","id":155243783,"user":{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T00:27:48Z","updated_at":"2015-11-10T00:27:48Z","body":"You need to wrap the -> chunks in parens. cond do: (true -> true)\n\n-- \n\n\n*José Valim*\nwww.plataformatec.com.br\nSkype: jv.ptec\nFounder and Director of R&D\n"}}