Skip to content

Commit

Permalink
Relax pattern for nested modules in unification
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Bärenz committed Dec 26, 2020
1 parent abf7a7c commit 559dc5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ex_type/unification.ex
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ defmodule ExType.Unification do
context,
{:%, _, [struct, {:%{}, _, args}]},
%ExType.Type.Struct{
struct: struct,
struct: struct_alias,
types: types
}
)
when is_atom(struct) and is_list(args) do
when is_atom(struct) and is_atom(struct_alias) and is_list(args) do
Enum.reduce(args, context, fn {key, value}, context when is_atom(key) ->
unify_pattern(context, value, Map.fetch!(types, key))
end)
Expand Down

0 comments on commit 559dc5a

Please sign in to comment.