kotlin-koans
kotlin-koans copied to clipboard
Task 32 java.lang.NoSuchMethodError: when we have Int property
When I use nonNull Int for propertyWithCounter test fails with java.lang.NoSuchMethodError.
var propertyWithCounter: Int = 0
set(value) {
field = value
counter++
}
But when I use var propertyWithCounter: Int? = null -- all OK Why it happens?
Reproduced only in Android Studio 1.3.4 with Kotlin plugin 1.2.61. https://try.kotlinlang.org/#/Kotlin%20Koans/Properties/Properties/Task.kt - here is all ok.