than_
06/29/2021, 12:14 PMjava.lang.IllegalArgumentException: object is not an instance of declaring class : package.PositiveInt2.Companion.invoke
This happens just by defining new refined type. I tried to copy PositiveInt
and just change the name
class PositiveInt2 private constructor(val value: Int) {
companion object : Refined<Int, PositiveInt2>(::PositiveInt2, {
ensure((it > 0) to "$it should be > 0")
})
}
is it a bug in a io.arrow-kt:arrow-refined-types-gradle-plugin:1.5.0-SNAPSHOT
or am I missing something?raulraja
06/29/2021, 12:25 PMthan_
06/29/2021, 12:26 PMplugins {
kotlin("multiplatform") version "1.5.0"
kotlin("plugin.serialization") version "1.5.0"
kotlin("kapt") version "1.5.0"
id("com.github.johnrengelman.shadow") version "6.1.0"
id("org.jlleitschuh.gradle.ktlint") version "10.0.0"
application
}
and
plugins {
id("com.android.application")
id("kotlin-android")
id("kotlin-kapt")
id("org.jetbrains.kotlin.plugin.serialization") version "1.5.0"
id("kotlin-parcelize")
}
raulraja
06/29/2021, 12:32 PM@JvmInline
value class PositiveInt private constructor(val value: Int) {
companion object : Refined<Int, PositiveInt>(::PositiveInt, {
ensure((it > 0) to "$it should be > 0")
})
}
than_
06/29/2021, 1:54 PMraulraja
06/29/2021, 4:17 PM