e359db4111
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).
23 lines
635 B
Kotlin
Vendored
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!!
|
|
}
|