KT-3576 Getters for float constants in objects always return 0.0 when constants are less than 1.0

#KT-3576 Fixed
This commit is contained in:
Mikhael Bogdanov
2013-05-06 10:41:48 +04:00
parent dd7c2cf78c
commit 22ddd05e09
3 changed files with 15 additions and 1 deletions
@@ -0,0 +1,9 @@
object TestObject {
val testFloat: Float = 0.9999
val otherFloat: Float = 1.01
}
fun box(): String {
return if (TestObject.testFloat.equals(0.9999.toFloat())
&& TestObject.otherFloat.equals(1.01.toFloat())) "OK" else "fail"
}