mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 04:24:43 +00:00
fix: dynamic type checking bugs
This commit is contained in:
parent
a6b72ea636
commit
5affa5065f
12 changed files with 91 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue