apatrida
07/04/2016, 6:51 PMjava.lang.IllegalAccessException: Class kotlin.reflect.jvm.internal.KClassImpl$objectInstance_$1 can not access a member of class uy.klutter.binder.TestConstruction$TestConstructWithCompanionCallables with modifiers "public static final"I tried:
constructClass.companionObject?.let { companion ->
val name = companion.simpleName
val field = companion.java.enclosingClass.getDeclaredField(name)
field.isAccessible = true
constructClass.companionObjectInstance
}
and it blows up on the lazy get of the last line.