Is it possible to accomplish the same seamless int...
# multiplatform
j
Is it possible to accomplish the same seamless interop between JVM and Kotlin types, such as
java.lang.Iterable
and
kotlin.collections.Iterable
in expect/actual declarations? For example, I have a Java class:
Copy code
public class Foo implements Iterable<String> {
    public Iterator<String> iterator() {
        ...
    }
}
and I’d like to be able to declare a common expect:
Copy code
expect class Bar : Iterable<String>
and implement the JVM actual:
Copy code
actual typealias Bar = Foo
But currently I get the error:
Copy code
Actual typealias 'Bar' has no corresponding expected declaration The following declaration is incompatible because some supertypes are missing in the actual declaration:
public open expect class Bar : Iterable<String> defined in ...
😢 1