Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Task 32 java.lang.NoSuchMethodError: when we have Int property #164

Open
AlexStankevich opened this issue Sep 10, 2018 · 0 comments
Open

Comments

@AlexStankevich
Copy link

AlexStankevich commented Sep 10, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant