[FIR] Don't analyze lambda twice inside delegate inference
This is a workaround for ^KT-54767
This commit is contained in:
committed by
Space Team
parent
7af43176ce
commit
2fd8bf9153
@@ -0,0 +1,18 @@
|
||||
// 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"
|
||||
Reference in New Issue
Block a user