It seems Kotlin is now compiled on codingame with JVM 1.6 target instead of JVM 1.8, probably since the last Kotlin 1.3 update.
Code that was working last summer using java 8 features (Comparator.comparingInt(…)) no longer compiles on codingame, and the error message indicates that a JVM 1.6 target is used :
error: calls to static methods in Java interfaces are prohibited in JVM target 1.6. Recompile with ‘-jvm-target 1.8’.
Ok we’ll try. Do you know if this kotlinc
jvm-target option (and potentially others) is documented somewhere?
I could not find any kotlinc documentation either (I usually let my IDE compile for me).
But by looking at the following classes from kotlin git repo, i would guess that the option to pass is : ‘jvmTarget’, and the value to use (for JDK 8) : ‘1.8’.
Also there must be someone in the team who has already done it, because i remember a post on the forum about going from jvm 1.5 to jvm 1.8 for kotlin.