-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
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")
package kotlin_test
import battlecode.common.RobotController
fun run(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.
fun check(x: String?) {
val y = x!! // inserts call to Intrinsics.throwNpe()
...
}fun listOperations() {
val a = 1..6 // references kotlin/ranges/IntRange
val b = a.map { it * 2 } // references kotlin/collections/CollectionsKt
}I'm using Kotlin 1.0.6 if that matters.
HalfVoxel, kazimuth and mplatt
Metadata
Metadata
Assignees
Labels
No labels