fix: dynamic type checking bugs

This commit is contained in:
Shunsuke Shibayama 2023-08-19 16:34:07 +09:00
parent a6b72ea636
commit 5affa5065f
12 changed files with 91 additions and 7 deletions

View file

@ -7,9 +7,9 @@ class Float(float):
def try_new(i): # -> Result[Nat]
if isinstance(i, float):
Float(i)
return Float(i)
else:
Error("not a float")
return Error("not a float")
def mutate(self):
return FloatMut(self)