feat(types): detect constraint base subtyping

This commit is contained in:
2026-06-19 13:57:21 +02:00
parent 6aacdb98b7
commit 92ca6b6732

View File

@@ -7,6 +7,7 @@ from midas.checker.types import (
AppliedType,
BaseType,
ComplexType,
ConstraintType,
ExtensionType,
Function,
GenericType,
@@ -130,6 +131,9 @@ class TypesRegistry:
return False
return self.is_subtype(bound, type2)
case (ConstraintType(type=base1), _):
return self.is_subtype(base1, type2)
return False
# TODO: verify the logic in here