https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
j

Jan Stoltman

05/27/2019, 9:48 AM
Hey guys, are function references available for K/N? I have functions like these ones:
Copy code
//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
d

Dominaezzz

05/27/2019, 10:12 AM
o

olonho

05/27/2019, 10:20 AM
yes, function references are supported, please report an issue with reproducer
j

Jan Stoltman

05/27/2019, 10:27 AM
Thanks guys, I will report then
7 Views