Commit bfa48484 authored by Tom Niget's avatar Tom Niget

Fix optional arg unification for types with no optional args

parent 188cda88
......@@ -203,7 +203,7 @@ class TypeOperator(BaseType, ABC):
continue
if a is not None and b is None:
if i >= self.optional_at:
if self.optional_at is not None and i >= self.optional_at:
continue
else:
raise IncompatibleTypesError(f"Cannot unify {self} and {other}, not enough arguments")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment