Files
kotlin-fork/js/js.translator/testFiles/number/cases/doubleConversions.kt
T
Pavel V. Talanov aecb1ce5a7 Double conversions.
2012-07-18 17:11:12 +04:00

21 lines
381 B
Kotlin

package foo
fun box(): Boolean {
val c: Double = 3.6
if (c.toDouble() != 3.6) {
return false
}
if (c.toFloat() != 3.6.toFloat()) {
return false
}
if (c.toByte() != 3.toByte()) {
return false
}
if (c.toInt() != 3) {
return false
}
if (c.toShort() != 3.toShort()) {
return false
}
return true
}