diff options
author | Andrea Leopardi <an.leopardi@gmail.com> | 2016-09-10 12:45:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-10 12:45:11 +0200 |
commit | f49963b66df7f6e1b71984088ddfc04deffb24d7 (patch) | |
tree | 0fdca4dbc8887d38589a6c9bb9543b0e6f7ed06a | |
parent | 1c629f3c11ee76b74cadbab56374991810b9fa50 (diff) | |
download | elixir-f49963b66df7f6e1b71984088ddfc04deffb24d7.tar.gz |
Fix the name of the last argument to defmodule/2 and defprotocol/2 (#5201)
-rw-r--r-- | lib/elixir/lib/kernel.ex | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/elixir/lib/kernel.ex b/lib/elixir/lib/kernel.ex index db05d4558..c11e5a7b6 100644 --- a/lib/elixir/lib/kernel.ex +++ b/lib/elixir/lib/kernel.ex @@ -3146,6 +3146,8 @@ defmodule Kernel do current module nor automatically set up an alias. """ + defmacro defmodule(alias, do_block) + defmacro defmodule(alias, do: block) do env = __CALLER__ boot? = bootstrapped?(Macro) @@ -3835,6 +3837,8 @@ defmodule Kernel do a given project, please check the functions in the `Protocol` module or the `mix compile.protocols` task. """ + defmacro defprotocol(name, do_block) + defmacro defprotocol(name, do: block) do Protocol.__protocol__(name, do: block) end |