OK. After more testing, it turns out that trying t...
# announcements
OK. After more testing, it turns out that trying to use
on code that references Scala 2.12.11's
(or any other class that references
) causes the compiler to crash. A minimal example is:
Copy code
import scala.collection.JavaConverters.asScalaBuffer

fun main() {
    val kotlinList: List<String> = listOf("abc", "def", "ghi")
    val scalaList = asScalaBuffer(kotlinList).toList
This works fine with Scala 2.12.10, but won’t even compile with Scala 2.12.11. The difference seems to be https://github.com/scala/scala/blob/v2.12.10/src/library/scala/collection/TraversableOnce.scala#L102 vs https://github.com/scala/scala/blob/v2.12.11/src/library/scala/collection/TraversableOnce.scala#L117 where they introduced a
object that is confusing Kotlinc’s bytecode analysis.
👍 3
I filed a bug: https://youtrack.jetbrains.com/issue/KT-39799 It’s actually a duplicate of https://youtrack.jetbrains.com/issue/KT-38325 but I’m going to let JetBrains decide how to resolve them since I thought the second one was a runtime bug and not a compiler bug until I read it really closely.