diff --git a/compiler/testData/diagnostics/tests/regressions/kt30245.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt30245.fir.kt index 6788b5d2688..4c0af7721fe 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt30245.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt30245.fir.kt @@ -36,40 +36,40 @@ class W4(val f: L2) { } fun test1() { // to extension lambda 0 - val w10 = W1 { this } // oi+ ni+ + val w10 = W1 { this } // oi+ ni+ val i10: E0 = id { this } // o1- ni+ - val j10 = id { this } // oi+ ni+ + val j10 = id { this } // oi+ ni+ val f10 = W1(fun Int.(): Int = this) // oi+ ni+ val g10: E0 = id(fun Int.(): Int = this) // oi+ ni+ val w11 = W1 { i: Int -> i } // oi- ni+ val i11: E0 = id { i: Int -> i } // o1+ ni+ - val w12 = W1 { i -> i } // oi- ni+ + val w12 = W1 { i -> i } // oi- ni+ val i12: E0 = id { i -> i } // oi- ni+ - val j12 = id { i -> i } // oi- ni+ + val j12 = id { i -> i } // oi- ni+ // yet unsupported cases - considering lambdas as extension ones unconditionally // val w13 = W1 { it } // this or it: oi- ni- // val i13: E0 = id { it } // this or it: oi- ni- // val j13 = id { it } // this or it: oi- ni- - val o14 = W1 { -> 0 } // oi+ ni+ + val o14 = W1 { -> 0 } // oi+ ni+ } fun test2() { // to extension lambda 1 - val w20 = W2 { this + it.length } // oi+ ni+ - val i20: E1 = id { this + it.length } // oi- ni+ - val w21 = W2 { this } // oi+ ni+ + val w20 = W2 { this + it.length } // oi+ ni+ + val i20: E1 = id { this + it.length } // oi- ni+ + val w21 = W2 { this } // oi+ ni+ val i21: E1 = id { this } // oi- ni+ - val f21 = W2(fun Int.(String): Int = this) // oi+ ni+ + val f21 = W2(fun Int.(String): Int = this) // oi+ ni+ val g21: E1 = id(fun Int.(String): Int = this) // oi+ ni+ - val w22 = W2 { s -> this + s.length } // oi+ ni+ - val i22: E1 = id { s -> this + s.length } // oi+ ni+ - val w23 = W2 { s -> s.length } // oi+ ni+ - val i23: E1 = id { s -> s.length } // oi+ ni+ - val w24 = W2 { s: String -> this + s.length } // oi+ ni+ + val w22 = W2 { s -> this + s.length } // oi+ ni+ + val i22: E1 = id { s -> this + s.length } // oi+ ni+ + val w23 = W2 { s -> s.length } // oi+ ni+ + val i23: E1 = id { s -> s.length } // oi+ ni+ + val w24 = W2 { s: String -> this + s.length } // oi+ ni+ // val i24: E1 = id { s: String -> this + s.length } //oi- ni- - val w25 = W2 { s: String -> s.length } // oi+ ni+ + val w25 = W2 { s: String -> s.length } // oi+ ni+ // val i25: E1 = id { s: String -> s.length } // oi- ni- // yet unsupported cases with ambiguity for the lambda conversion (commented constructors in wrappers above) @@ -78,8 +78,8 @@ fun test2() { // to extension lambda 1 // val w27 = W2 { i, s: String -> i + s.length } // overload oi- ni- // val i27: E1 = id { i, s: String -> i + s.length } // overload oi- ni- - val w28 = W2 { i: Int, s -> i + s.length } // oi- ni+ - val i28: E1 = id { i: Int, s -> i + s.length } // oi- ni+ + val w28 = W2 { i: Int, s -> i + s.length } // oi- ni+ + val i28: E1 = id { i: Int, s -> i + s.length } // oi- ni+ val w29 = W2 { i: Int, s: String -> i + s.length } // oi- ni+ val i29: E1 = id { i: Int, s: String -> i + s.length } // oi+ ni+ @@ -89,11 +89,11 @@ fun test2() { // to extension lambda 1 } fun test3() { // to non-extension lambda 1 - val w30 = W3 { i -> i } // oi+ ni+ + val w30 = W3 { i -> i } // oi+ ni+ val i30: L1 = id { i -> i } // oi+ ni+ - val w31 = W3 { it } // oi+ ni+ - val i31: L1 = id { it } // oi- ni+ - val j31 = id { it } // oi+ ni+ + val w31 = W3 { it } // oi+ ni+ + val i31: L1 = id { it } // oi- ni+ + val j31 = id { it } // oi+ ni+ // yet unsupported cases - considering lambdas as extension ones unconditionally // val w32 = W3 { this } // this or it: oi- ni- @@ -108,7 +108,7 @@ fun test3() { // to non-extension lambda 1 } fun test4() { // to non-extension lambda 2 - val w30 = W4 { i, s -> i } // oi+ ni+ + val w30 = W4 { i, s -> i } // oi+ ni+ val i30: L2 = id { i, s -> i } // oi+ ni+ // yet unsupported cases with ambiguity for the lambda conversion (commented constructors in wrappers above) @@ -119,7 +119,7 @@ fun test4() { // to non-extension lambda 2 } open class A(a: () -> Unit) { - constructor(f: (String) -> Unit) : this({ -> f("") }) + constructor(f: (String) -> Unit) : this({ -> f("") }) } class B: A({ s -> "1" })