mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 02:39:20 +00:00
fix: smallest type selection
This commit is contained in:
parent
b0959b13e7
commit
7c9970f140
7 changed files with 141 additions and 94 deletions
|
@ -66,6 +66,8 @@ class IntMut: # inherits Int
|
|||
|
||||
def __init__(self, i):
|
||||
self.value = Int(i)
|
||||
def __int__(self):
|
||||
return self.value.__int__()
|
||||
|
||||
def __repr__(self):
|
||||
return self.value.__repr__()
|
||||
|
|
|
@ -40,6 +40,9 @@ class NatMut(IntMut): # and Nat
|
|||
def __init__(self, n: Nat):
|
||||
self.value = n
|
||||
|
||||
def __int__(self):
|
||||
return self.value.__int__()
|
||||
|
||||
def __repr__(self):
|
||||
return self.value.__repr__()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue