One of my libraries provides non default collectio...
# k2-adopters
a
One of my libraries provides non default collection implementations to interop well with Javascript. Compiling this on all platforms without K2 works like a charm. When I enable the useK2 flag on gradle.properties and run compileKotlinJvm, I am forced to override spliterator like so
Copy code
> Task :kollections-interoperable:compileKotlinJvm FAILED
w: Language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
e: file:///root-proj/kollections/interoperable/src/commonMain/kotlin/kollections/CollectionLike.kt:8:1 CollectionLike must override spliterator because it inherits multiple interface methods of it
e: file:///root-proj/kollections/interoperable/src/commonMain/kotlin/kollections/FunctionalCollection.kt:9:1 FunctionalCollection must override spliterator because it inherits multiple interface methods of it
e: file:///root-proj/kollections/interoperable/src/commonMain/kotlin/kollections/internal/AbstractCollection.kt:19:1 AbstractCollection must override spliterator because it inherits multiple interface methods of it
##### 'kotlin.experimental.tryK2' results (Kotlin/Native not checked) #####
:kollections-interoperable:compileKotlinJvm: 2.0 language version
##### 100% (1/1) tasks have been compiled with Kotlin 2.0 #####
More over, all other platforms do compile except Jvm (i.e. compileKotlinJs and compileKotlinLinuxX64). Is this a bug??
d
Yeah, it seems like a bug Could you please report an issue with a code of your class hierarchy for
CollectionLike
and other interfaces? kotl.in/issue
a
I will, but its an open source project. So this will be easy