Skip to content

Commit 4201165

Browse files
author
Manuel Bärenz
committed
Relax pattern for nested modules in unification
1 parent cde1a9d commit 4201165

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ex_type/unification.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ defmodule ExType.Unification do
230230
context,
231231
{:%, _, [struct, {:%{}, _, args}]},
232232
%ExType.Type.Struct{
233-
struct: struct,
233+
struct: struct_alias,
234234
types: types
235235
}
236236
)
237-
when is_atom(struct) and is_list(args) do
237+
when is_atom(struct) and is_atom(struct_alias) and is_list(args) do
238238
Enum.reduce(args, context, fn {key, value}, context when is_atom(key) ->
239239
unify_pattern(context, value, Map.fetch!(types, key))
240240
end)

0 commit comments

Comments
 (0)