https://kotlinlang.org logo
Title
p

Peter

03/26/2023, 7:55 AM
When enabling K2 on 1.8.20-RC2, I get a compiler error on
inherits conflicting members: exec, exec
on a class I inherit. The two methods in the base class (part of
JupyterReplTestCase
) are:
fun exec(code: Code): Any? {
    return execEx(code).renderedValue
}

@JvmName("execTyped")
inline fun <reified T : Any> exec(code: Code): T {
   val res = exec(code)
   res.shouldBeInstanceOf<T>()
   return res
}
P.S Could very well be a compatibility issue since
JupyterReplTestCase
is compiled against on 1.8.0-Beta as far as I can tell and I run it against 1.8.20-RC2
i

Ivan Kubyshkin [JetBrains]

03/27/2023, 6:06 AM
Can you attach a sample project?
p

Peter

03/27/2023, 11:11 AM
Will have a look if I can easily isolate and reproduce the issue in a sample project. But if not, the complete project is open source and can be easily reproduced there.
@Ivan Kubyshkin [JetBrains] Hereby a very simple project. Just a plain
mvn compile
generates the compile error.
i

Ivan Kubyshkin [JetBrains]

03/28/2023, 10:16 AM
@Peter thank you! I filed an issue - https://youtrack.jetbrains.com/issue/KT-57624
k

kirillrakhman

04/03/2023, 4:48 PM
It's already fixed in master.