We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f68202 commit 33035e9Copy full SHA for 33035e9
lib/elixir/lib/kernel.ex
@@ -2061,10 +2061,14 @@ defmodule Kernel do
2061
true ->
2062
raise ArgumentError, message: "cannot dynamically set attribute @#{name} inside function"
2063
false ->
2064
- if name == :behavior do
2065
- IO.write :stderr, "warning: @behavior attribute is not supported, please use @behaviour instead\n" <>
2066
- Exception.format_stacktrace(env_stacktrace(env))
+ case name do
+ :behavior ->
+ IO.write :stderr, "warning: @behavior attribute is not supported, please use @behaviour instead\n" <>
2067
+ Exception.format_stacktrace(env_stacktrace(env))
2068
+ _ ->
2069
+ :ok
2070
end
2071
+
2072
quote do: Module.put_attribute(__MODULE__, unquote(name), unquote(arg))
2073
2074
0 commit comments