FIR: Fix inference of builder-inference function from expect type
Previously, such calls were being completed with FULL mode and incorrect INFERENCE_NO_INFORMATION_FOR_PARAMETER has been reported
This commit is contained in:
committed by
TeamCityServer
parent
18e93b50d9
commit
592256976e
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
fun getAllPossibleNames(subScopes: List<List<String>>): Set<String> = withValidityAssertion {
|
||||
buildSet {
|
||||
subScopes.flatMapTo(this) { it }
|
||||
}
|
||||
}
|
||||
|
||||
inline fun <R> withValidityAssertion(action: () -> R): R {
|
||||
return action()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return getAllPossibleNames(listOf(listOf("O"), listOf("K"))).joinToString("")
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
// ISSUE: KT-41164
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
Reference in New Issue
Block a user