Skip to content

Commit 1ff0e1a

Browse files
prefiksJosé Valim
authored andcommitted
Teach Mix erlang compiler alternative spelling for -behavior declaration (#7290)
Erlang recognizes both -behaviour and -behavior, but mix was only able to process one, which made erlang compiler complain about missing behaviour when source file was using the other one
1 parent ae66125 commit 1ff0e1a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/mix/lib/mix/tasks/compile.erlang.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ defmodule Mix.Tasks.Compile.Erlang do
165165
{:attribute, _, :behaviour, behaviour} ->
166166
%{erl | behaviours: [behaviour | erl.behaviours]}
167167

168+
{:attribute, _, :behavior, behaviour} ->
169+
%{erl | behaviours: [behaviour | erl.behaviours]}
170+
168171
{:attribute, _, :compile, value} when is_list(value) ->
169172
%{erl | compile: value ++ erl.compile}
170173

0 commit comments

Comments
 (0)