https://kotlinlang.org logo
#k2-early-adopters
Title
# k2-early-adopters
r

Robert Jaros

10/13/2023, 6:13 AM
I'm trying K2 with a multiplatform project (JS, Wasm). With the old compiler I can just declare
expect class NativeList<E> : MutableList<E>
in a common source set. But with K2 enabled I need to also declare all methods of the interface (which also works with the old compiler). Is it a bug?
Looks similar to https://youtrack.jetbrains.com/issue/KT-60079 but I'm not sure.
d

dmitriy.novozhilov

10/13/2023, 6:31 AM
It is by design You need to declare all abstract methods or make NativeList an abstract class
🙏 1
e

Edoardo Luppi

10/13/2023, 1:34 PM
Noticed this too testing K2. I think it makes sense, more explicit on the intent