Thread
#serialization
    Lukasz Kalnik

    Lukasz Kalnik

    1 month ago
    Ah ok, I see, this is not a member function but an extension function and has to be manually imported:
    import kotlinx.serialization.decodeFromString
    Lukáš Kúšik

    Lukáš Kúšik

    1 month ago
    you can usually press enter on the correct autocomplete entry and it will do the correct import, although it is bad that the IDE behaves like this in the first place
    Lukasz Kalnik

    Lukasz Kalnik

    1 month ago
    The autocomplete didn't suggest the extension function. I suppose that's because the member function is obscuring the extension function.
    They both have the same name.
    IDE doesn't give suggestions for alternative extension functions if it sees only the signature mismatch
    You're right, maybe I just didn't notice it
    But after you've chosen the wrong one (like me), IDE doesn't give any hint that the problem might be fixed with an import. But I guess this is too much to expect right now.
    Thanks for the hint!
    Lukáš Kúšik

    Lukáš Kúšik

    1 month ago
    if you somehow break the flow, the IDE gets stuck on the member function and does not offer you to import the extension function - like in your case. I consider this a bug and I think there are already issues for this opened. What I usually do is that I start retyping the function name and select the correct suggestion, it will then snap into the right state 🙂
    Lukasz Kalnik

    Lukasz Kalnik

    1 month ago
    That's a good tip. What I usually do, I go into the source code of the class and search for the missing overload. Which didn't help here, as the extension
    decodeFromString()
    is in a different file than the member function 🙂
    And anyway from the Compose world I know the problems e.g. when using
    var expanded by remember { mutableStateOf(false) }
    where you just get error messages that getValue()/setValue() is missing and the only way to fix it is to add appropriate imports manually. So it's easy to get confused between all these IDE/Kotlin compiler inconsistencies.
    Lukáš Kúšik

    Lukáš Kúšik

    1 month ago
    I often stumble upon this issue with LazyLists using Paging 😄
    LazyListScope.items(items: LazyPagingItems<T>)
    Lukasz Kalnik

    Lukasz Kalnik

    1 month ago
    Ah, good to know, haven't yet used LazyList.