ef44077cb7
Several tests are affected by the usage of fixation direction calculator in FIR. Restored to mimimize test data changes. It is unnecessary in FE10 because a type variable with unknown type is inferred into an error type, but affects test data in FIR where Nothing/Any is selected by direction (as a temporary measure). CR candidate in spec test is Unresolved in FIR because top-level CRs are resolved as call arguments. Resolution ambiguity is also present in FE10 when CR is wrapped into an id call.
21 lines
447 B
Kotlin
Vendored
21 lines
447 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE
|
|
// WITH_RUNTIME
|
|
|
|
import kotlin.experimental.ExperimentalTypeInference
|
|
|
|
@UseExperimental(ExperimentalTypeInference::class)
|
|
fun <R> combined(
|
|
check: () -> Unit,
|
|
@BuilderInference block: TestInterface<R>.() -> Unit
|
|
): R = TODO()
|
|
|
|
interface TestInterface<R> {
|
|
fun emit(r: R)
|
|
}
|
|
|
|
fun test() {
|
|
val ret = combined({ }) {
|
|
emit(1)
|
|
}
|
|
}
|