Files
kotlin-fork/compiler/testData/codegen/box/inference/builderAndDelegateInference.kt
T
Dmitriy Novozhilov 2fd8bf9153 [FIR] Don't analyze lambda twice inside delegate inference
This is a workaround for ^KT-54767
2022-11-03 08:30:09 +00:00

19 lines
410 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_IR
// WITH_STDLIB
// ISSUE: KT-54767
interface A {
fun getCallableNames(): Set<String>
}
class B(val declared: A, val supers: List<A>) {
private val callableNamesCached by lazy(LazyThreadSafetyMode.PUBLICATION) {
buildSet {
addAll(declared.getCallableNames())
supers.flatMapTo(this) { it.getCallableNames() }
}
}
}
fun box() = "OK"