Value inference includes arrays
This commit is contained in:
parent
1cdf19e533
commit
60ab98dde6
@ -1,4 +1,4 @@
|
|||||||
val dataforgeVersion by extra("0.1.2-dev-5")
|
val dataforgeVersion by extra("0.1.2-dev-6")
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import gradle.kotlin.dsl.plugins._e2353938d1a2b15c365d69a8d533ab12.js
|
||||||
import org.gradle.kotlin.dsl.*
|
import org.gradle.kotlin.dsl.*
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@ -11,8 +12,6 @@ kotlin {
|
|||||||
compilations.all {
|
compilations.all {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = "1.8"
|
jvmTarget = "1.8"
|
||||||
// This was used in kmath-koma, but probably if we need it better to apply it for all modules
|
|
||||||
freeCompilerArgs = listOf("-progressive")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,13 @@ interface Value {
|
|||||||
false -> False
|
false -> False
|
||||||
is Number -> NumberValue(value)
|
is Number -> NumberValue(value)
|
||||||
is Iterable<*> -> ListValue(value.map { of(it) })
|
is Iterable<*> -> ListValue(value.map { of(it) })
|
||||||
|
is DoubleArray -> ListValue(value.map { NumberValue(it) })
|
||||||
|
is IntArray -> ListValue(value.map { NumberValue(it) })
|
||||||
|
is FloatArray -> ListValue(value.map { NumberValue(it) })
|
||||||
|
is ShortArray -> ListValue(value.map { NumberValue(it) })
|
||||||
|
is LongArray -> ListValue(value.map { NumberValue(it) })
|
||||||
|
is ByteArray -> ListValue(value.map { NumberValue(it) })
|
||||||
|
is Array<*> -> ListValue(value.map { of(it) })
|
||||||
is Enum<*> -> EnumValue(value)
|
is Enum<*> -> EnumValue(value)
|
||||||
is CharSequence -> StringValue(value.toString())
|
is CharSequence -> StringValue(value.toString())
|
||||||
else -> throw IllegalArgumentException("Unrecognized type of the object (${value::class}) converted to Value")
|
else -> throw IllegalArgumentException("Unrecognized type of the object (${value::class}) converted to Value")
|
||||||
|
Loading…
Reference in New Issue
Block a user