Jeff Lockhart
01/28/2021, 5:54 PMjava.lang.Iterable
and kotlin.collections.Iterable
in expect/actual declarations? For example, I have a Java class:
public class Foo implements Iterable<String> {
public Iterator<String> iterator() {
...
}
}
and I’d like to be able to declare a common expect:
expect class Bar : Iterable<String>
and implement the JVM actual:
actual typealias Bar = Foo
But currently I get the error:
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 ...