Revert "Workaround for KT-37302"
This reverts commit ae208f58a4.
Issue fixed, workaround no longer needed.
This commit is contained in:
@@ -188,13 +188,12 @@ internal abstract class KCallableImpl<out R> : KCallable<R> {
|
|||||||
|
|
||||||
private fun defaultPrimitiveValue(type: Type): Any? =
|
private fun defaultPrimitiveValue(type: Type): Any? =
|
||||||
if (type is Class<*> && type.isPrimitive) {
|
if (type is Class<*> && type.isPrimitive) {
|
||||||
@Suppress("RemoveRedundantCallsOfConversionMethods")
|
|
||||||
when (type) {
|
when (type) {
|
||||||
Boolean::class.java -> false
|
Boolean::class.java -> false
|
||||||
Char::class.java -> 0.toChar()
|
Char::class.java -> 0.toChar()
|
||||||
Byte::class.java -> 0.toByte()
|
Byte::class.java -> 0.toByte()
|
||||||
Short::class.java -> 0.toShort()
|
Short::class.java -> 0.toShort()
|
||||||
Int::class.java -> 0.toInt() // .toInt() conversion is workaround for KT-37302
|
Int::class.java -> 0
|
||||||
Float::class.java -> 0f
|
Float::class.java -> 0f
|
||||||
Long::class.java -> 0L
|
Long::class.java -> 0L
|
||||||
Double::class.java -> 0.0
|
Double::class.java -> 0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user