Advance deprecation level of FP to lesser than Int types to ERROR #KT-30360
This commit is contained in:
@@ -12,7 +12,7 @@ fun box() : String {
|
||||
assertEquals(1.toByte(), foo(1L) { x -> x!!.toByte() })
|
||||
assertEquals(1.toShort(), foo(1L) { x -> x!!.toShort() })
|
||||
assertEquals('a'.toDouble(), foo('a') { x -> x!!.toDouble() })
|
||||
assertEquals(1.0.toByte(), foo(1.0) { x -> x!!.toByte() })
|
||||
assertEquals(1.0.toInt(), foo(1.0) { x -> x!!.toInt() })
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -42,13 +42,9 @@ fun box(): String {
|
||||
65534.0, 65535.0, 65536.0,
|
||||
2147483647.0, 2147483648.0, 2147483649.0,
|
||||
Double.MAX_VALUE, Double.POSITIVE_INFINITY)) {
|
||||
assertEquals(d.toInt().toByte(), d.toByte())
|
||||
assertEquals(d.toInt().toShort(), d.toShort())
|
||||
assertEquals(d.toInt().toChar(), d.toChar())
|
||||
|
||||
val f = d.toFloat()
|
||||
assertEquals(f.toInt().toByte(), f.toByte())
|
||||
assertEquals(f.toInt().toShort(), f.toShort())
|
||||
assertEquals(f.toInt().toChar(), f.toChar())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user