dalexander
11/14/2018, 6:53 PM@JvmStatic
annotation. Anyone have any idea what’s going on? All of the documentation I can find seems to indicate that only the companion object itself should have static. This is causing problems the framework I’m using is trying to use reflection against the local properties and because they are static it’s not working. (This is on 1.3.0 in case it matters)diesieben07
11/14/2018, 6:54 PMconst val
properties become static
, too.dalexander
11/14/2018, 6:55 PMclass Foo {
companion object {
var temp = 3
var bar = "asdf"
init {
val fields = Foo.Companion.javaClass.fields
fields.forEach {
println(it.name)
}
}
}
}
This is the test code I’m using to try and isolate the issue.diesieben07
11/14/2018, 6:59 PM