K2: Allow PCLA inference when a value parameter has a TV type

^KT-64877 Fixed
This commit is contained in:
Denis.Zharkov
2024-01-10 19:10:15 +01:00
committed by Space Team
parent b2ca19da73
commit 72b0372927
39 changed files with 272 additions and 44 deletions
@@ -4,7 +4,7 @@
fun test() {
val buildee = buildFromValue(
innerBuild { setInnerTypeVariable(TargetType()) },
<!CANNOT_INFER_PARAMETER_TYPE!>{ it.<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>placeholderExtensionInvokeOnInnerBuildee<!>() }<!>
{ <!BUILDER_INFERENCE_STUB_RECEIVER!>it<!>.placeholderExtensionInvokeOnInnerBuildee() }
)
// 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
@@ -3,13 +3,13 @@
fun test() {
val buildee = stepByStepBuild(
<!CANNOT_INFER_PARAMETER_TYPE!>{
{
it.<!UNRESOLVED_REFERENCE!>concreteTypeMemberProperty<!>
TargetType()
}<!>,
<!CANNOT_INFER_PARAMETER_TYPE!>{
},
{
consumeTargetTypeBase(it)
}<!>
}
)
// 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
@@ -2,17 +2,17 @@
// CHECK_TYPE_WITH_EXACT
fun test() {
val buildee = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>parallelBuild<!>(
<!CANNOT_INFER_PARAMETER_TYPE!>{
val buildee = parallelBuild(
{
consumeTargetTypeBase(it)
}<!>,
<!CANNOT_INFER_PARAMETER_TYPE!>{
},
{
consumeTargetType(it)
}<!>
}
)
// 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
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>checkExactType<!><<!CANNOT_INFER_PARAMETER_TYPE!>Buildee<TargetType><!>>(buildee)
checkExactType<Buildee<TargetType>>(buildee)
}
@@ -3,12 +3,12 @@
fun test() {
val buildee = parallelBuild(
<!CANNOT_INFER_PARAMETER_TYPE!>{
{
setTypeVariable(TargetType())
}<!>,
<!CANNOT_INFER_PARAMETER_TYPE!>{
},
{
consumeDifferentType(<!ARGUMENT_TYPE_MISMATCH!>getTypeVariable()<!>)
}<!>
}
)
// 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
@@ -3,12 +3,12 @@
fun test() {
val buildee = parallelInOutBuild(
<!CANNOT_INFER_PARAMETER_TYPE!>{
{
setInProjectedTypeVariable(TargetType())
}<!>,
<!CANNOT_INFER_PARAMETER_TYPE!>{
},
{
consumeDifferentType(<!ARGUMENT_TYPE_MISMATCH!>getOutProjectedTypeVariable()<!>)
}<!>
}
)
// 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