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

jschneider

11/16/2023, 7:59 AM
I get strange compiler errors after upgrading to Kotlin 2.0.0-beta1: They are related to expect/actual of classes. Is there anything I should know? I get this message: e: file///home/johannes/projects/com.cedarsoft.monorepo/internal/open/commons/i18n/src/commonMain/kotlin/it/neckar/open/formatting/DateTimeFormat.kt92:8 Class 'DateTimeFormatIso8601' is not abstract and does not implement abstract member 'format'. DateTimeFormatIso8601 is an "expect class". The "format" method is declared in the interface.
d

dmitriy.novozhilov

11/16/2023, 8:00 AM
cc @bobko
p

PHondogo

11/16/2023, 8:37 AM
I've faced with the same case. As i understand now all members of expect class must be explicetly declared in it. expect override fun ...
b

bobko

11/16/2023, 9:32 AM
It's this issue: https://youtrack.jetbrains.com/issue/KT-59739 Yes, in K2, it's required to override abstract members explicitly on expect side
j

jschneider

11/16/2023, 8:51 PM
Yeah, thanks! Would be great to have some syntax highlighting some time in the future 😉