I have a runtime problem with Kotlin, which I do n...
# announcements
s
I have a runtime problem with Kotlin, which I do not understand. In my opinion it should either be a compile time error or no error at all. I created a generic class named ValidationRule<T> with a internal var value: Any? = null set(value) { ... } Then from another file I run something similar to val value=""; val validationRule : ValidationRule<*> = getValRule(); validationRule.value = value Everything compiles just fine (as expected) but during runtime I get a NoSuchMethodError: ValidationRule.setValue$KtStaticWeb_compileKotlin(Ljava/lang/Object;)V When adding a breakpoint and checking ValidationRule::class.java.declaredMethods, there is a public method ValidationRule.setValue$KtStaticWeb_main(java.lang.Object) Is the compiler doing something wrong?