Menu

#91 Integer and BigInteger are distinguishable

open
2
2005-06-01
2005-06-01
No

Integer and BigInteger are distinguishable (breaking
== semantics)

From
http://www.eros-os.org/pipermail/e-lang/2004-October/010113.html

Updoc script demonstrating failure:

? def a := 4
# value: 4

? def b := (400000000000000000000 // 100000000000000000000)
# value: 4

? a == b
# value: true

? a.__getAllegedType()
# value: int32

? b.__getAllegedType()
# value: <type:java.math.BigInteger>

From
http://www.eros-os.org/pipermail/e-lang/2004-October/010114.html

Updoc script that should pass when this bug is fixed:

? def a := 4
# value: 4

? def b := (400000000000000000000 // 100000000000000000000)
# value: 4

? a == b
# value: true

? a.__getAllegedType()
# value: int

? b.__getAllegedType()
# value: int

? 400000000000000000000.__getAllegedType()
# value: int

Discussion


Log in to post a comment.

MongoDB Logo MongoDB