Skip to content

Ambiguous error message when dealing with immutable properties #13

@dnagler

Description

@dnagler

As we discussed on Slack, I ran into this stacktrace:

class kotlin.reflect.jvm.internal.KProperty1Impl cannot be cast to class kotlin.reflect.KMutableProperty1 (kotlin.reflect.jvm.internal.KProperty1Impl and kotlin.reflect.KMutableProperty1 are in unnamed module of loader 'app')
java.lang.ClassCastException: class kotlin.reflect.jvm.internal.KProperty1Impl cannot be cast to class kotlin.reflect.KMutableProperty1 (kotlin.reflect.jvm.internal.KProperty1Impl and kotlin.reflect.KMutableProperty1 are in unnamed module of loader 'app')
	at app.cash.tempest.internal.Binding.setDb(Codec.kt:188)

which didn't make it very obvious that the root cause was that I needed to change a val to a var.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions