K2: Adjust test data after PCLA implementation [red-to-green]

^KT-59791 In Progress
This commit is contained in:
Denis.Zharkov
2023-12-13 15:08:19 +01:00
committed by Space Team
parent 8459465177
commit b9019d3de1
74 changed files with 232 additions and 205 deletions
@@ -49,40 +49,40 @@ fun main() {
add("one")
val secondParameter = get(1)
<!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(secondParameter) // ERROR: [OVERLOAD_RESOLUTION_AMBIGUITY] Overload resolution ambiguity. All these functions match.
println(secondParameter) // ERROR: [OVERLOAD_RESOLUTION_AMBIGUITY] Overload resolution ambiguity. All these functions match.
}
val list2 = buildList {
add("one")
<!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(get(1)) // ERROR: [OVERLOAD_RESOLUTION_AMBIGUITY] Overload resolution ambiguity. All these functions match.
println(get(1)) // ERROR: [OVERLOAD_RESOLUTION_AMBIGUITY] Overload resolution ambiguity. All these functions match.
}
val list3 = buildList {
add("one")
val secondParameter = Inv(get(1))
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(secondParameter)
foo(secondParameter)
}
val list4 = buildList {
add("one")
val secondParameter = get(1)
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(Inv(secondParameter))
foo(Inv(secondParameter))
}
val list5 = buildList {
add("one")
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(Inv(get(1)))
foo(Inv(get(1)))
}
val list6 = buildList {
add("one")
get(0).<!NONE_APPLICABLE!>bar<!>()
<!BUILDER_INFERENCE_STUB_RECEIVER!>get(0)<!>.bar()
}
val list7 = buildList {
add("one")
with (get(0)) {
<!NONE_APPLICABLE!>bar<!>()
bar()
}
}
val list71 = buildList {
@@ -90,7 +90,7 @@ fun main() {
with (get(0)) l1@ {
with (listOf(1)) {
<!NONE_APPLICABLE!>bar<!>()
bar()
}
}
}
@@ -99,21 +99,21 @@ fun main() {
with (get(0)) {
with (listOf(1)) {
<!NONE_APPLICABLE!>bar<!>()
bar()
}
}
}
val list8 = buildList {
add("one")
Inv(get(0)).<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo2<!>()
Inv(get(0)).foo2()
}
val list9 = buildList {
add("one")
with (get(0)) {
with (Inv(this)) {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo2<!>()
foo2()
}
}
}
@@ -122,7 +122,7 @@ fun main() {
with (get(0)) {
with (Inv(this)) {
<!NONE_APPLICABLE!>bar<!>()
bar()
}
}
}
@@ -148,46 +148,46 @@ fun main() {
val list13 = buildList {
add("one")
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo000<!>(get(0), 0f, get(0))
foo000(get(0), 0f, get(0))
}
val list14 = buildList {
add("one")
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo0000<!>(get(0), 0f, get(0))
foo0000(get(0), 0f, get(0))
}
val list17 = buildList l1@ {
add("one")
with (get(0)) {
<!NONE_APPLICABLE!>foo0003<!>(0f, this@l1.get(0))
foo0003(0f, <!ARGUMENT_TYPE_MISMATCH!>this@l1.get(0)<!>)
}
}
val list18 = buildList {
add("one")
get(0).<!NONE_APPLICABLE!>foo0003<!>(0f, get(0))
<!BUILDER_INFERENCE_STUB_RECEIVER!>get(0)<!>.foo0003(0f, <!ARGUMENT_TYPE_MISMATCH!>get(0)<!>)
}
val map1 = buildMap {
put(1, "one")
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo11<!>(entries)
foo11(entries)
}
// There aren't specific errors below as casting value arguments doesn't make a resolve successful
val list15 = buildList {
add("one")
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo0001<!>(get(0), 0f, get(0))
<!NONE_APPLICABLE!>foo0001<!>(get(0), 0f, get(0))
}
val list16 = buildList {
add("one")
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo0002<!>(get(0), 0f, get(0))
<!NONE_APPLICABLE!>foo0002<!>(get(0), 0f, get(0))
}
}
@@ -211,13 +211,13 @@ fun test() {
add("")
with (get()) {
with (listOf(1)) {
<!NONE_APPLICABLE!>bar<!>()
bar()
}
}
},
{
put(1, "one")
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo11<!>(entries())
foo11(entries())
}
)
}
@@ -0,0 +1,12 @@
// WITH_STDLIB
// ISSUE: KT-50293
fun main() {
val list = buildList {
add("one")
add("two")
val secondParameter = get(1)
println(secondParameter <!USELESS_CAST!>as String<!>)
}
}
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
// WITH_STDLIB
// ISSUE: KT-50293