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:
Paweł Chmielowski
2018-01-31 13:41:51 -02:00
committed by José Valim
parent ae66125f2e
commit 1ff0e1ac7a
+3
View File
@@ -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}