From 8365eb54dd2b701c23c961a8def71222162aa766 Mon Sep 17 00:00:00 2001 From: "Denis.Zharkov" Date: Tue, 19 Dec 2023 18:43:54 +0100 Subject: [PATCH] K2: Adjust test data after PCLA implementation [multiLambdaRestriction] ^KT-59791 In Progress --- .../builderInference/issues/kt53422a.fir.kt | 4 ++-- .../builderInference/issues/kt53422b.fir.kt | 10 ++++----- .../builderInference/issues/kt53553.fir.kt | 12 +++++----- .../builderInference/issues/kt53740a.fir.kt | 12 +++++----- .../builderInference/issues/kt53740b.fir.kt | 12 +++++----- .../inference/builderInference/kt53422.fir.kt | 2 +- .../inference/builderInference/kt53639.fir.kt | 2 +- .../multiLambdaRestriction.fir.kt | 22 +++++++++---------- .../multiLambdaRestrictionDisabled.fir.kt | 2 +- 9 files changed, 39 insertions(+), 39 deletions(-) diff --git a/compiler/testData/diagnostics/tests/builderInference/issues/kt53422a.fir.kt b/compiler/testData/diagnostics/tests/builderInference/issues/kt53422a.fir.kt index 6208ac347d9..b16da0099f0 100644 --- a/compiler/testData/diagnostics/tests/builderInference/issues/kt53422a.fir.kt +++ b/compiler/testData/diagnostics/tests/builderInference/issues/kt53422a.fir.kt @@ -3,8 +3,8 @@ fun test() { val buildee = buildFromValue( - innerBuild { setInnerTypeVariable(TargetType()) }, - { it.placeholderExtensionInvokeOnInnerBuildee() } + innerBuild { setInnerTypeVariable(TargetType()) }, + { 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 diff --git a/compiler/testData/diagnostics/tests/builderInference/issues/kt53422b.fir.kt b/compiler/testData/diagnostics/tests/builderInference/issues/kt53422b.fir.kt index 554027b0f6c..95f06b77c28 100644 --- a/compiler/testData/diagnostics/tests/builderInference/issues/kt53422b.fir.kt +++ b/compiler/testData/diagnostics/tests/builderInference/issues/kt53422b.fir.kt @@ -3,17 +3,17 @@ fun test() { val buildee = stepByStepBuild( - { + { it.concreteTypeMemberProperty TargetType() - }, - { + }, + { 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 - checkExactType>(; Buildee")!>buildee) + checkExactType>(buildee) } diff --git a/compiler/testData/diagnostics/tests/builderInference/issues/kt53553.fir.kt b/compiler/testData/diagnostics/tests/builderInference/issues/kt53553.fir.kt index c167d393400..6bff97894af 100644 --- a/compiler/testData/diagnostics/tests/builderInference/issues/kt53553.fir.kt +++ b/compiler/testData/diagnostics/tests/builderInference/issues/kt53553.fir.kt @@ -2,17 +2,17 @@ // CHECK_TYPE_WITH_EXACT fun test() { - val buildee = parallelBuild( - { + val buildee = parallelBuild( + { consumeTargetTypeBase(it) - }, - { + }, + { 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 - checkExactType>(; Buildee")!>buildee) + checkExactType<Buildee>(buildee) } diff --git a/compiler/testData/diagnostics/tests/builderInference/issues/kt53740a.fir.kt b/compiler/testData/diagnostics/tests/builderInference/issues/kt53740a.fir.kt index 6f61986a215..60029a4ec69 100644 --- a/compiler/testData/diagnostics/tests/builderInference/issues/kt53740a.fir.kt +++ b/compiler/testData/diagnostics/tests/builderInference/issues/kt53740a.fir.kt @@ -3,16 +3,16 @@ fun test() { val buildee = parallelBuild( - { + { setTypeVariable(TargetType()) - }, - { - consumeDifferentType(getTypeVariable()) - } + }, + { + consumeDifferentType(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 - checkExactType>(; Buildee")!>buildee) + checkExactType>(buildee) } diff --git a/compiler/testData/diagnostics/tests/builderInference/issues/kt53740b.fir.kt b/compiler/testData/diagnostics/tests/builderInference/issues/kt53740b.fir.kt index 46ff0dea365..7f12240c3ea 100644 --- a/compiler/testData/diagnostics/tests/builderInference/issues/kt53740b.fir.kt +++ b/compiler/testData/diagnostics/tests/builderInference/issues/kt53740b.fir.kt @@ -3,16 +3,16 @@ fun test() { val buildee = parallelInOutBuild( - { + { setInProjectedTypeVariable(TargetType()) - }, - { - consumeDifferentType(getOutProjectedTypeVariable()) - } + }, + { + consumeDifferentType(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 - checkExactType>(; Buildee")!>buildee) + checkExactType>(buildee) } diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/kt53422.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/kt53422.fir.kt index 9e7c7be6e8d..21ca35801c4 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/kt53422.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/kt53422.fir.kt @@ -3,7 +3,7 @@ fun test() { foo( flow { emit(0) } - ) { it.collect {} } + ) { it.collect {} } // 0. Initial // W <: Any / declared upper bound diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/kt53639.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/kt53639.fir.kt index 25652802ba4..ece7065f880 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/kt53639.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/kt53639.fir.kt @@ -12,7 +12,7 @@ data class Output(val source: InputWrapper>) fun main2(input: InputWrapper): Output { val output = input.doMapping( foo = { buildList { add("this is List") } }, - bar = { it.isNotEmpty() }, + bar = { it.isNotEmpty() }, ) return Output(source = output) diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/multiLambdaRestriction.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/multiLambdaRestriction.fir.kt index 7f606cad70f..9adf19a699c 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/multiLambdaRestriction.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/multiLambdaRestriction.fir.kt @@ -9,9 +9,9 @@ fun a(first: R, second: (List) -> Unit) {} fun test1() { a( buildList { add("") }, - second = { + second = { it.myGenericExt() - } + } ) } @@ -21,11 +21,11 @@ fun b(first: () -> List, second: (List) -> Unit) {} fun test2() { b( first = { - buildList { add("") } + buildList { add("") } }, - second = { + second = { it.myExt() // Note: must be extension to add constraints - } + } ) } @@ -45,13 +45,13 @@ fun test3() { ) select ( - myBuildList { add("") }, - myBuildList { add(1) }, + myBuildList { add("") }, + myBuildList { add(1) }, ) select ( - run { myBuildList { add("") } }, - myBuildList { add(1) }, + run { myBuildList { add("") } }, + myBuildList { add(1) }, ) } @@ -64,7 +64,7 @@ fun buildPartList(left: MutableList.() -> Unit, right: MutableList.() fun test4() { buildPartList( - left = { add(1) }, - right = { add("") } + left = { add(1) }, + right = { add("") } ) } diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/multiLambdaRestrictionDisabled.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/multiLambdaRestrictionDisabled.fir.kt index 00e223e118a..c0a937efc58 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/multiLambdaRestrictionDisabled.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/multiLambdaRestrictionDisabled.fir.kt @@ -22,7 +22,7 @@ fun b(first: () -> List, second: (List) -> Unit) {} fun test2() { b( first = { - buildList { add("") } + buildList { add("") } }, second = { it.myExt() // Note: must be extension to add constraints