@@ -101,7 +101,8 @@ class Direction(Enum):
101101 DownTo = 1
102102
103103 def __str__ (self ):
104- return ("to" , "downto" )[self .value ] # TODO: check performance
104+ index : int = self .value
105+ return ("to" , "downto" )[index ] # TODO: check performance
105106
106107
107108@export
@@ -121,7 +122,8 @@ class Mode(Enum):
121122 Linkage = 5
122123
123124 def __str__ (self ):
124- return ("" , "in" , "out" , "inout" , "buffer" , "linkage" )[self .value ] # TODO: check performance
125+ index : int = self .value
126+ return ("" , "in" , "out" , "inout" , "buffer" , "linkage" )[index ] # TODO: check performance
125127
126128
127129@export
@@ -445,10 +447,10 @@ def __init__(self, subTypeName: Name):
445447class ConstrainedScalarSubTypeSymbol (SubTypeSymbol ):
446448 _range : 'Range'
447449
448- def __init__ (self , subTypeName : Name , r : 'Range' = None ):
450+ def __init__ (self , subTypeName : Name , rng : 'Range' = None ):
449451 super ().__init__ (subTypeName )
450452 self ._subType = None
451- self ._range = r
453+ self ._range = rng
452454
453455 @property
454456 def Range (self ) -> 'Range' :
@@ -734,6 +736,7 @@ def __init__(self, name: str):
734736@export
735737class BaseType (ModelEntity , NamedEntity ):
736738 """``BaseType`` is the base class of all type entities in this model."""
739+
737740 def __init__ (self , name : str ):
738741 """
739742 Initializes underlying ``BaseType``.
@@ -1618,16 +1621,6 @@ class BaseConstraint(ModelEntity):
16181621 pass
16191622
16201623
1621- # FIXME: exists 2 times
1622- @export
1623- class RangeExpression (BaseConstraint ):
1624- _range : Range
1625-
1626- @property
1627- def Range (self ):
1628- return self ._range
1629-
1630-
16311624# FIXME: Is this used?
16321625@export
16331626class RangeAttribute (BaseConstraint ):
0 commit comments