mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 12:14:43 +00:00
fix(compiler): runtime type matching system
This commit is contained in:
parent
92614ce8d2
commit
af0fff8226
25 changed files with 793 additions and 429 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue