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
This commit is contained in:
committed by
José Valim
parent
ae66125f2e
commit
1ff0e1ac7a
@@ -165,6 +165,9 @@ defmodule Mix.Tasks.Compile.Erlang do
|
||||
{:attribute, _, :behaviour, behaviour} ->
|
||||
%{erl | behaviours: [behaviour | erl.behaviours]}
|
||||
|
||||
{:attribute, _, :behavior, behaviour} ->
|
||||
%{erl | behaviours: [behaviour | erl.behaviours]}
|
||||
|
||||
{:attribute, _, :compile, value} when is_list(value) ->
|
||||
%{erl | compile: value ++ erl.compile}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user