fix(compiler): runtime type matching system

This commit is contained in:
Shunsuke Shibayama 2023-02-12 01:34:12 +09:00
parent 92614ce8d2
commit af0fff8226
25 changed files with 793 additions and 429 deletions

View file

@ -33,6 +33,8 @@ class NatMut(IntMut): # and Nat
self.value = n
def __repr__(self):
return self.value.__repr__()
def __hash__(self):
return self.value.__hash__()
def __eq__(self, other):
if isinstance(other, int):
return self.value == other