I am testing a new kotlin-allopen
and kotlin-spring
plugins under Kotlin 1.0.6
.
In one of my @Transactional
-annotated classes I have a field:
@JvmField val foo = null
When I try to build the project, I get:
Error:(45, 5) Kotlin: JvmField can only be applied to final property
Is there any proper way of dealing with this? My real-life code needed @JvmField
because of the JUnit's @Rule
. Managed to "solve" the problem by removing a @JvmField
and annotating a getter instead. Not sure if a bug or a feature.