[FRONTEND] Fix a inspection warning (#1914)

"Expected type 'SupportsIndex', got 'constexpr' instead" is no longer
reported.
This commit is contained in:
danny.jang
2023-07-11 13:30:59 +09:00
committed by GitHub
parent d39d78fa08
commit 4a20d5010b

View File

@@ -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)