fix: smallest type selection

This commit is contained in:
Shunsuke Shibayama 2023-04-01 08:58:30 +09:00
parent b0959b13e7
commit 7c9970f140
7 changed files with 141 additions and 94 deletions

View file

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

View file

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