Skip to content

Commit 780ee38

Browse files
committed
Raise runtime_error in to_float
1 parent 727dd5e commit 780ee38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pixie/vm/numbers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def to_float(x):
320320
return rt.wrap(float(x.int_val()))
321321
if isinstance(x, BigInteger):
322322
return rt.wrap(x.bigint_val().tofloat())
323-
assert False
323+
object.runtime_error(u"Cannot convert %s to float" %x.type().name())
324324

325325
def to_float_conv(c):
326326
if c == Float:

0 commit comments

Comments
 (0)