I primarily upgraded to Kotlin 1.1 so that my Kotlin code would no longer have to be crippled by long-since obsolete Java 6 limitations. (In Kotlin 1.0, I'm strangely forced to write many files in Java in order to accomplish things.)
Is there some design reason that the following code is not supported in Kotlin 1.1-M04, or is it just not implemented yet in this EAP release?
fun foo() = Unit
Only functions in named objects and companion objects of classes can be annotated with '@JvmStatic'
Even more importantly though, why is the
-jvm-target option locked to 1.6 in the IDEA plugin??
Note that using the command line to specify the 1.8 target level doesn't change things:
>kotlinc-jvm.bat -jvm-target 1.8 static_interface_method.kt
static_interface_method.kt:6:9: error: only functions in named objects and companion objects of classes can be annotated with '@JvmStatic'