Kotlin support would be great and nearly works but Kotlin relies on kotlin/Intrinsics and other stdlib classes for many operations that it performs.
Even the most basic RobotPlayer will be rejected by the instrumenter because Kotlin inserts non-null checks using Intrinsics.requireNonNull.
@file:JvmName("RobotPlayer")
packagekotlin_testimportbattlecode.common.RobotControllerfunrun(rc:RobotController) {
println("Hello World")
}These particular checks can be disabled with -Xno-param-assertions and -Xno-call-assertions, but Kotlin relies on its stdlib for all kinds of things which can't be disabled.
funcheck(x:String?) {
val y = x!!// inserts call to Intrinsics.throwNpe()...
}funlistOperations() {
val a =1..6// references kotlin/ranges/IntRangeval b = a.map { it *2 } // references kotlin/collections/CollectionsKt
}I'm using Kotlin 1.0.6 if that matters.
Kotlin support would be great and nearly works but Kotlin relies on
kotlin/Intrinsicsand other stdlib classes for many operations that it performs.Even the most basic RobotPlayer will be rejected by the instrumenter because Kotlin inserts non-null checks using
Intrinsics.requireNonNull.These particular checks can be disabled with
-Xno-param-assertionsand-Xno-call-assertions, but Kotlin relies on its stdlib for all kinds of things which can't be disabled.I'm using Kotlin 1.0.6 if that matters.