mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
[FRONTEND] Fix a inspection warning (#1914)
"Expected type 'SupportsIndex', got 'constexpr' instead" is no longer reported.
This commit is contained in:
@@ -401,6 +401,9 @@ class constexpr:
|
||||
def __repr__(self) -> str:
|
||||
return f"constexpr[{self.value}]"
|
||||
|
||||
def __index__(self):
|
||||
return self.value
|
||||
|
||||
def __add__(self, other):
|
||||
return constexpr(self.value + other.value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user