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

Arkadii Ivanov

01/15/2021, 5:30 PM
Given I have an
expect object
with inner interface inside it, how can I use this interface in an
actual
implementation?
Copy code
expect object MyObject {
    fun foo(): MyInterface
    
    interface MyInterface {
        fun bar()
    }
}

actual object MyObject {
    actual fun foo(): MyObject.MyInterface = // MyInterface is unresolved here 
        TODO()
}
Looks like I have to add actual implementation of the interface as well.
a

andylamax

01/16/2021, 1:00 AM
Answered your own question
2 Views