Thread
#multiplatform
    Jan Stoltman

    Jan Stoltman

    3 years ago
    Hey guys, are function references available for K/N? I have functions like these ones:
    //Declaration
    fun <K,V>cache(getNew: suspend () -> List<Pair<K, V>>)
    //Usage
    cache(::getAllChannelsFromApi)
    When compiling for Android everything works fine, but on iOS I get
    Type mismatch: inferred type is KSuspendFunction0<List<Pair<Int, Channel>>> but suspend () -> List<Pair<Int, Channel>> was expected
    Dominaezzz

    Dominaezzz

    3 years ago
    olonho

    olonho

    3 years ago
    yes, function references are supported, please report an issue with reproducer
    Jan Stoltman

    Jan Stoltman

    3 years ago
    Thanks guys, I will report then