Files
kotlin-fork/compiler/testData/diagnostics/tests/builderInference/issues/kt49263.fir.kt
T
Denis.Zharkov e359db4111 K2: Set proper source for implicit it/receiver parameter
Previously, error types on those implicit parameters were being lost.

Changed test data is only partly here
(only parts that are considered to be correct).

Other ones (new green-to-red changes) should belong to the next commit
and will be fixed soon (as a part of PCLA).
2024-01-11 10:32:12 +00:00

23 lines
635 B
Kotlin
Vendored

// ISSUE: KT-49263
// CHECK_TYPE_WITH_EXACT
fun test() {
val targetType = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildPostponedTypeVariable<!> <!CANNOT_INFER_PARAMETER_TYPE!>{
consumeTargetType(<!CANNOT_INFER_PARAMETER_TYPE!>this<!>)
}<!>
// exact type equality check — turns unexpected compile-time behavior into red code
// considered to be non-user-reproducible code for the purposes of these tests
checkExactType<TargetType>(targetType)
}
class TargetType
fun consumeTargetType(value: TargetType) {}
fun <PTV> buildPostponedTypeVariable(block: PTV.() -> Unit): PTV {
return null!!
}