I decided to give Kotlin a shot by just using the “convert java to kotlin” function in IntelliJ. Apparently that set things up wrong.
I tried doing the same thing, but after applying the Kotlin Gradle plugin and placing the file in src/kotlin and it all worked. Thanks for the help anyway guys.
The code would be:
@Volatile var tmpEndedAt: Long? = null