22from abc import ABCMeta , abstractmethod
33from ..meta_classes import HasFiller , HasCardinality , HasOperands
44from typing import TypeVar , Generic , Final , Sequence , Union , Iterable
5- from .nary_boolean_expression import OWLObjectIntersectionOf
5+ from .nary_boolean_expression import OWLObjectIntersectionOf , OWLObjectUnionOf
66from .class_expression import OWLAnonymousClassExpression , OWLClassExpression
77from ..owl_property import OWLPropertyExpression , OWLObjectPropertyExpression , OWLDataPropertyExpression
88from ..owl_data_ranges import OWLPropertyRange , OWLDataRange
@@ -461,6 +461,7 @@ class OWLQuantifiedDataRestriction(OWLQuantifiedRestriction[OWLDataRange],
461461 _filler : OWLDataRange
462462
463463 def __init__ (self , filler : OWLDataRange ):
464+ assert isinstance (filler , OWLDataRange ), "filler must be an OWLDataRange"
464465 self ._filler = filler
465466
466467 def get_filler (self ) -> OWLDataRange :
@@ -478,6 +479,7 @@ class OWLDataCardinalityRestriction(OWLCardinalityRestriction[OWLDataRange],
478479
479480 @abstractmethod
480481 def __init__ (self , cardinality : int , property : OWLDataPropertyExpression , filler : OWLDataRange ):
482+ assert isinstance (filler , OWLDataRange ), "filler must be an OWLDataRange"
481483 super ().__init__ (cardinality , filler )
482484 self ._property = property
483485
0 commit comments