This compiles in Kotlin 1.5.21 but fails to typech...
# announcements
e
This compiles in Kotlin 1.5.21 but fails to typecheck in Kotlin 1.5.30-RC:
Copy code
fun f(l: MutableList<String>) {}
@ExperimentalStdlibApi
val l: List<Any> = buildList {
    javaClass
    f(this)
}
Did something change with builder inference?
r
e
no, it happens with other
@BuilderInference
, this is just the simplest reproduction example
d
cc @Victor Petukhov
v
We have a lot of changes in the builder inference and soon there will be the corresponding announcement. Your example will work in 1.5.30 (including RC) under the compiler flag
-Xunrestricted-builder-inference
.
👍 2