diff --git a/compiler/testData/ir/irText/classes/initValInLambda.kt.txt b/compiler/testData/ir/irText/classes/initValInLambda.kt.txt index 204bcdda7aa..dda935da7a0 100644 --- a/compiler/testData/ir/irText/classes/initValInLambda.kt.txt +++ b/compiler/testData/ir/irText/classes/initValInLambda.kt.txt @@ -9,7 +9,7 @@ class TestInitValInLambdaCalledOnce { get init { - 1.run(block = local fun Int.() { + 1.run(block = local fun Int.() { #x = 0 } ) diff --git a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt index ab68f45edbd..3d89e877f4d 100644 --- a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt +++ b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt @@ -1,5 +1,5 @@ data class A { - constructor(runA: @ExtensionFunctionType Function2 = local fun A.(it: String) { + constructor(runA: @ExtensionFunctionType Function2 = local fun A.(it: String) { return Unit } ) /* primary */ { diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt.txt index b7e8fcf366d..5ef1a5378a3 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt.txt @@ -4,7 +4,7 @@ annotation class Ann : Annotation { } val test1: Int /* by */ - field = lazy(initializer = local fun (): Int { + field = lazy(initializer = local fun (): Int { return 42 } ) diff --git a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt.txt index 8c127cd8d0b..9a32e4b7676 100644 --- a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt.txt @@ -9,7 +9,7 @@ annotation class A : Annotation { fun foo(m: Map) { @A(x = "foo/test") val test: Int - val test$delegate: Lazy = lazy(initializer = local fun (): Int { + val test$delegate: Lazy = lazy(initializer = local fun (): Int { return 42 } ) diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.kt.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.kt.txt index a1d5fd7b042..ae08381b7f1 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.kt.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.kt.txt @@ -36,7 +36,7 @@ class C { get val test7: Int /* by */ - field = lazy(initializer = local fun (): Int { + field = lazy(initializer = local fun (): Int { return 42 } ) diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.kt.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.kt.txt index 21581e024dc..205c61703d2 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.kt.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.kt.txt @@ -1,5 +1,5 @@ val test1: Int /* by */ - field = lazy(initializer = local fun (): Int { + field = lazy(initializer = local fun (): Int { return 42 } ) @@ -19,7 +19,7 @@ class C { get val test2: Int /* by */ - field = lazy(initializer = local fun (): Int { + field = lazy(initializer = local fun (): Int { return 42 } ) diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.kt.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.kt.txt index c7bcd592dd8..63410a39c3b 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.kt.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.kt.txt @@ -1,6 +1,6 @@ fun test1() { val x: Int - val x$delegate: Lazy = lazy(initializer = local fun (): Int { + val x$delegate: Lazy = lazy(initializer = local fun (): Int { return 42 } ) diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.kt.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.kt.txt index e7cfcc6ca3b..5cbf2d613cc 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.kt.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.kt.txt @@ -29,7 +29,7 @@ val test6: Int get val test7: Int /* by */ - field = lazy(initializer = local fun (): Int { + field = lazy(initializer = local fun (): Int { return 42 } ) diff --git a/compiler/testData/ir/irText/declarations/parameters/lambdas.kt.txt b/compiler/testData/ir/irText/declarations/parameters/lambdas.kt.txt index 925e802a909..61a4f27e6d2 100644 --- a/compiler/testData/ir/irText/declarations/parameters/lambdas.kt.txt +++ b/compiler/testData/ir/irText/declarations/parameters/lambdas.kt.txt @@ -1,26 +1,26 @@ val test1: Function1 - field = local fun (it: String): String { + field = local fun (it: String): String { return it } get val test2: @ExtensionFunctionType Function2 - field = local fun Any.(it: Any): Int { + field = local fun Any.(it: Any): Int { return it.hashCode() } get val test3: Function2 - field = local fun (i: Int, j: Int) { + field = local fun (i: Int, j: Int) { return Unit } get val test4: Function2 - field = local fun (i: Int, j: Int) { + field = local fun (i: Int, j: Int) { } get diff --git a/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.kt.txt b/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.kt.txt index 47a9dfdf77e..557f34ee614 100644 --- a/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.kt.txt +++ b/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.kt.txt @@ -17,10 +17,10 @@ fun box(): String { result = "OK" } - return f(, f2 = local fun (): String { + return f(, f2 = local fun (): String { return "O" } -).plus(other = f(f1 = local fun (): String { +).plus(other = f(f1 = local fun (): String { return "K" } )) diff --git a/compiler/testData/ir/irText/expressions/badBreakContinue.kt.txt b/compiler/testData/ir/irText/expressions/badBreakContinue.kt.txt index c05774f4d11..b056fc3aef9 100644 --- a/compiler/testData/ir/irText/expressions/badBreakContinue.kt.txt +++ b/compiler/testData/ir/irText/expressions/badBreakContinue.kt.txt @@ -12,7 +12,7 @@ fun test2() { fun test3() { while (true) { // BLOCK - val lambda: Function0 = local fun (): Nothing { + val lambda: Function0 = local fun (): Nothing { error("") /* ERROR EXPRESSION */ error("") /* ERROR EXPRESSION */ } diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt index 9e07f1a3a99..7054d892edb 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt @@ -1,5 +1,5 @@ fun testBreakFor() { - val xs: IntArray = IntArray(size = 10, init = local fun (i: Int): Int { + val xs: IntArray = IntArray(size = 10, init = local fun (i: Int): Int { return i } ) @@ -38,7 +38,7 @@ fun testBreakDoWhile() { } fun testContinueFor() { - val xs: IntArray = IntArray(size = 10, init = local fun (i: Int): Int { + val xs: IntArray = IntArray(size = 10, init = local fun (i: Int): Int { return i } ) diff --git a/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt.txt index d1d857ad4f7..ff78f303dc0 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt.txt @@ -20,21 +20,21 @@ fun C.extensionBoth(i: Int, s: String = "", vararg t: String) { } fun testExtensionVararg() { - use(f = local fun extensionVararg(p0: C, p1: Int) { + use(f = local fun extensionVararg(p0: C, p1: Int) { p0.extensionVararg(i = p1) } ) } fun testExtensionDefault() { - use(f = local fun extensionDefault(p0: C, p1: Int) { + use(f = local fun extensionDefault(p0: C, p1: Int) { p0.extensionDefault(i = p1) } ) } fun testExtensionBoth() { - use(f = local fun extensionBoth(p0: C, p1: Int) { + use(f = local fun extensionBoth(p0: C, p1: Int) { p0.extensionBoth(i = p1) } ) diff --git a/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.kt.txt index e8737a2c15d..856a06456a7 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.kt.txt @@ -17,28 +17,28 @@ fun fnv(vararg xs: Int): Int { } fun test0() { - return useUnit0(fn = local fun fn0() { + return useUnit0(fn = local fun fn0() { fn0() /*~> Unit */ } ) } fun test1() { - return useUnit1(fn = local fun fn1(p0: Int) { + return useUnit1(fn = local fun fn1(p0: Int) { fn1(x = p0) /*~> Unit */ } ) } fun testV0() { - return useUnit0(fn = local fun fnv() { + return useUnit0(fn = local fun fnv() { fnv() /*~> Unit */ } ) } fun testV1() { - return useUnit1(fn = local fun fnv(p0: Int) { + return useUnit1(fn = local fun fnv(p0: Int) { fnv(xs = [p0]) /*~> Unit */ } ) diff --git a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt index 24878a4d8b4..d45da24e38c 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt @@ -46,7 +46,7 @@ fun withVararg(vararg xs: Int): Int { fun test1() { { // BLOCK val tmp0_array: A = A - val tmp2_sam: IFoo = local fun withVararg(p0: Int) { + val tmp2_sam: IFoo = local fun withVararg(p0: Int) { withVararg(xs = [p0]) /*~> Unit */ } /*-> IFoo */ @@ -57,7 +57,7 @@ fun test1() { fun test2() { { // BLOCK val tmp0_array: B = B - val tmp2_sam: IFoo2 = local fun withVararg(p0: Int) { + val tmp2_sam: IFoo2 = local fun withVararg(p0: Int) { withVararg(xs = [p0]) /*~> Unit */ } /*-> IFoo2 */ diff --git a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt index bfb7f9bba69..d259c3e1edd 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt @@ -30,7 +30,7 @@ class Outer { } fun testConstructor(): Any { - return use(fn = local fun (p0: Int): C { + return use(fn = local fun (p0: Int): C { return C(xs = [p0]) } ) diff --git a/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt index e0950390950..b71aa180da8 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt @@ -20,14 +20,14 @@ fun use(fn: Function0): Any { } fun testFn(): Any { - return use(fn = local fun foo(): String { + return use(fn = local fun foo(): String { return foo() } ) } fun testCtor(): Any { - return use(fn = local fun (): C { + return use(fn = local fun (): C { return C() } ) diff --git a/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.kt.txt index 1036bd906ae..662743840da 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.kt.txt @@ -36,7 +36,7 @@ class C { } fun testLambda() { - useSuspend(fn = local suspend fun () { + useSuspend(fn = local suspend fun () { foo1() } ) @@ -47,42 +47,42 @@ fun testNoCoversion() { } fun testSuspendPlain() { - useSuspend(fn = local suspend fun foo1() { + useSuspend(fn = local suspend fun foo1() { foo1() } ) } fun testSuspendWithArgs() { - useSuspendInt(fn = local suspend fun fooInt(p0: Int) { + useSuspendInt(fn = local suspend fun fooInt(p0: Int) { fooInt(x = p0) } ) } fun testWithVararg() { - useSuspend(fn = local suspend fun foo2() { + useSuspend(fn = local suspend fun foo2() { foo2() } ) } fun testWithVarargMapped() { - useSuspendInt(fn = local suspend fun foo2(p0: Int) { + useSuspendInt(fn = local suspend fun foo2(p0: Int) { foo2(xs = [p0]) } ) } fun testWithCoercionToUnit() { - useSuspend(fn = local suspend fun foo3() { + useSuspend(fn = local suspend fun foo3() { foo3() /*~> Unit */ } ) } fun testWithDefaults() { - useSuspend(fn = local suspend fun foo4() { + useSuspend(fn = local suspend fun foo4() { foo4() } ) diff --git a/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.kt.txt index 9890992ceda..2c53f1d3be3 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.kt.txt @@ -31,7 +31,7 @@ object Obj : A { } fun testUnbound() { - use1(fn = local fun foo(p0: A, p1: Int) { + use1(fn = local fun foo(p0: A, p1: Int) { p0.foo(xs = [p1]) /*~> Unit */ } ) diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt.txt index 9ac7eb2bc0c..968be6d330d 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt.txt @@ -11,7 +11,7 @@ fun withVararg(vararg xs: Int): Int { } fun test() { - useFoo(foo = local fun withVararg(p0: Int) { + useFoo(foo = local fun withVararg(p0: Int) { withVararg(xs = [p0]) /*~> Unit */ } /*-> IFoo */) diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt.txt index 3b81f93c538..9ef62ca6265 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt.txt @@ -35,21 +35,21 @@ object Host { } fun testDefault(): String { - return use(fn = local fun fnWithDefault(p0: Int): String { + return use(fn = local fun fnWithDefault(p0: Int): String { return fnWithDefault(a = p0) } ) } fun testVararg(): String { - return use(fn = local fun fnWithVarargs(p0: Int): String { + return use(fn = local fun fnWithVarargs(p0: Int): String { return fnWithVarargs(xs = [p0]) } ) } fun testCoercionToUnit() { - return coerceToUnit(fn = local fun fnWithDefault(p0: Int) { + return coerceToUnit(fn = local fun fnWithDefault(p0: Int) { fnWithDefault(a = p0) /*~> Unit */ } ) @@ -66,14 +66,14 @@ fun testImportedObjectMember(): String { } fun testDefault0(): String { - return use0(fn = local fun fnWithDefaults(): String { + return use0(fn = local fun fnWithDefaults(): String { return fnWithDefaults() } ) } fun testVararg0(): String { - return use0(fn = local fun fnWithVarargs(): String { + return use0(fn = local fun fnWithVarargs(): String { return fnWithVarargs() } ) diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt index be006419800..90a6f0853cd 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt @@ -11,7 +11,7 @@ fun sum(vararg args: Int): Int { } fun nsum(vararg args: Number): Int { - return sum(args = [*IntArray(size = args.(), init = local fun (it: Int): Int { + return sum(args = [*IntArray(size = args.(), init = local fun (it: Int): Int { return args.get(index = it).toInt() } )]) @@ -33,7 +33,7 @@ fun useStringArray(fn: Function1, Unit>) { } fun testPlainArgs() { - usePlainArgs(fn = local fun sum(p0: Int, p1: Int): Int { + usePlainArgs(fn = local fun sum(p0: Int, p1: Int): Int { return sum(args = [p0, p1]) } ) @@ -48,7 +48,7 @@ fun testArrayAsVararg() { } fun testArrayAndDefaults() { - useStringArray(fn = local fun zap(p0: Array) { + useStringArray(fn = local fun zap(p0: Array) { zap(b = [*p0]) } ) diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.kt.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.kt.txt index e29ccce9721..1113aec2de0 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.kt.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.kt.txt @@ -1,5 +1,5 @@ val test1: Function0 - field = local fun () { + field = local fun () { 42 /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt.txt b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt.txt index 34bf34fce0e..bc4951b1792 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt.txt @@ -18,7 +18,7 @@ abstract enum class X : Enum { get override val value: Function0 - field = local fun (): String { + field = local fun (): String { return B.() } diff --git a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.kt.txt b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.kt.txt index 7aa56b4715f..15079bfa843 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.kt.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.kt.txt @@ -27,7 +27,7 @@ open enum class MyEnum : Enum { } val aLambda: Function0 - field = local fun () { + field = local fun () { Z.( = 1) Z.foo() } diff --git a/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.kt.txt b/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.kt.txt index 0b8c3ca9914..5c974d8b40f 100644 --- a/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.kt.txt +++ b/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.kt.txt @@ -104,7 +104,7 @@ fun testIfTheElseAnnotated_throwsJvm(a: A, flag: Boolean) { } fun testLambdaResultExpression_throws(a: A) { - local fun (): Int { + local fun (): Int { return { // BLOCK val tmp0_subject: A = a when { diff --git a/compiler/testData/ir/irText/expressions/funInterface/arrayAsVarargAfterSamArgument_fi.kt.txt b/compiler/testData/ir/irText/expressions/funInterface/arrayAsVarargAfterSamArgument_fi.kt.txt index a88cc4b0f0a..6f90e6e597e 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/arrayAsVarargAfterSamArgument_fi.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/arrayAsVarargAfterSamArgument_fi.kt.txt @@ -10,11 +10,11 @@ fun foo2(r1: IRunnable, r2: IRunnable, vararg s: String) { } fun test(fn: Function0, r: IRunnable, s: String, arr: Array) { - foo1(r = local fun () { + foo1(r = local fun () { return Unit } /*-> IRunnable */, s = [s]) - foo1(r = local fun () { + foo1(r = local fun () { return Unit } /*-> IRunnable */, s = [*arr]) @@ -22,33 +22,33 @@ fun test(fn: Function0, r: IRunnable, s: String, arr: Array) { foo1(r = fn /*-> IRunnable */, s = [*arr]) foo1(r = r, s = [s]) foo1(r = r, s = [*arr]) - foo2(r1 = local fun () { + foo2(r1 = local fun () { return Unit } - /*-> IRunnable */, r2 = local fun () { + /*-> IRunnable */, r2 = local fun () { return Unit } /*-> IRunnable */, s = [s]) - foo2(r1 = local fun () { + foo2(r1 = local fun () { return Unit } - /*-> IRunnable */, r2 = local fun () { + /*-> IRunnable */, r2 = local fun () { return Unit } /*-> IRunnable */, s = [*arr]) - foo2(r1 = fn /*-> IRunnable */, r2 = local fun () { + foo2(r1 = fn /*-> IRunnable */, r2 = local fun () { return Unit } /*-> IRunnable */, s = [s]) - foo2(r1 = fn /*-> IRunnable */, r2 = local fun () { + foo2(r1 = fn /*-> IRunnable */, r2 = local fun () { return Unit } /*-> IRunnable */, s = [*arr]) - foo2(r1 = r, r2 = local fun () { + foo2(r1 = r, r2 = local fun () { return Unit } /*-> IRunnable */, s = [s]) - foo2(r1 = r, r2 = local fun () { + foo2(r1 = r, r2 = local fun () { return Unit } /*-> IRunnable */, s = [*arr]) diff --git a/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.kt.txt b/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.kt.txt index 9755c2389c3..42f264a46d5 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.kt.txt @@ -8,7 +8,7 @@ fun foo(f: Foo): String { } fun test(): String { - return foo(f = local fun (): String { + return foo(f = local fun (): String { return "OK" } /*-> Foo */) diff --git a/compiler/testData/ir/irText/expressions/funInterface/partialSam.kt.txt b/compiler/testData/ir/irText/expressions/funInterface/partialSam.kt.txt index 1b6caa75643..d636473a6b8 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/partialSam.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/partialSam.kt.txt @@ -55,11 +55,11 @@ val fis: Fn get fun test(j: J) { - j.runConversion(f1 = (), f2 = local fun (s: String, i: Int, ti: Int): String { + j.runConversion(f1 = (), f2 = local fun (s: String, i: Int, ti: Int): String { return "" } /*-> Fn */) /*~> Unit */ - j.runConversion(f1 = local fun (s: String, i: Int, ts: String): Int { + j.runConversion(f1 = local fun (s: String, i: Int, ts: String): Int { return 1 } /*-> Fn */, f2 = ()) /*~> Unit */ diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt.txt b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt.txt index b7d224afc3f..2374a0e3e50 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt.txt @@ -7,20 +7,20 @@ fun useVararg(vararg foos: IFoo) { } fun testLambda() { - useVararg(foos = [ local fun (it: Int) { + useVararg(foos = [local fun (it: Int) { return Unit } /*-> IFoo */]) } fun testSeveralLambdas() { - useVararg(foos = [ local fun (it: Int) { + useVararg(foos = [local fun (it: Int) { return Unit } - /*-> IFoo */, local fun (it: Int) { + /*-> IFoo */, local fun (it: Int) { return Unit } - /*-> IFoo */, local fun (it: Int) { + /*-> IFoo */, local fun (it: Int) { return Unit } /*-> IFoo */]) @@ -31,7 +31,7 @@ fun withVarargOfInt(vararg xs: Int): String { } fun testAdaptedCR() { - useVararg(foos = [ local fun withVarargOfInt(p0: Int) { + useVararg(foos = [local fun withVarargOfInt(p0: Int) { withVarargOfInt(xs = [p0]) /*~> Unit */ } /*-> IFoo */]) diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargsMixed.kt.txt b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargsMixed.kt.txt index ca03e3fbd49..797fff5a4a1 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargsMixed.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargsMixed.kt.txt @@ -6,7 +6,7 @@ fun interface MyRunnable { fun test(a: Any, r: MyRunnable) { when { a is MyRunnable -> { // BLOCK - foo(rs = [ local fun () { + foo(rs = [local fun () { return Unit } /*-> MyRunnable */, r, a /*as MyRunnable */]) diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt.txt b/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt.txt index b217e5e1faa..4efa141094d 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt.txt @@ -18,7 +18,7 @@ fun testSamConstructor(): KRunnable { } fun testSamCosntructorOnAdapted(): KRunnable { - return local fun foo1() { + return local fun foo1() { foo1() /*~> Unit */ } /*-> KRunnable */ @@ -29,7 +29,7 @@ fun testSamConversion() { } fun testSamConversionOnAdapted() { - use(r = local fun foo1() { + use(r = local fun foo1() { foo1() /*~> Unit */ } /*-> KRunnable */) diff --git a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt.txt b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt.txt index 36b9c18af8d..9c9cac7e101 100644 --- a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt.txt +++ b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt.txt @@ -3,7 +3,7 @@ fun testSimple(): Box { } inline fun testArray(n: Int, crossinline block: Function0): Array { - return Array(size = n, init = local fun (it: Int): T { + return Array(size = n, init = local fun (it: Int): T { return block.invoke() } ) diff --git a/compiler/testData/ir/irText/expressions/kt37570.kt.txt b/compiler/testData/ir/irText/expressions/kt37570.kt.txt index 1feada39ea7..063f44f05dc 100644 --- a/compiler/testData/ir/irText/expressions/kt37570.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt37570.kt.txt @@ -13,7 +13,7 @@ class A { get init { - a().apply(block = local fun String.() { + a().apply(block = local fun String.() { #b = } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/expressions/lambdaInCAO.kt.txt b/compiler/testData/ir/irText/expressions/lambdaInCAO.kt.txt index 843798b59bf..ef3c333d5bb 100644 --- a/compiler/testData/ir/irText/expressions/lambdaInCAO.kt.txt +++ b/compiler/testData/ir/irText/expressions/lambdaInCAO.kt.txt @@ -9,7 +9,7 @@ operator fun Any.set(index: Function0, value: Int) { } fun test1(a: Any) { - a.plusAssign(lambda = local fun () { + a.plusAssign(lambda = local fun () { return Unit } ) @@ -18,7 +18,7 @@ fun test1(a: Any) { fun test2(a: Any) { { // BLOCK val tmp0_array: Any = a - val tmp1_index0: Function0 = local fun () { + val tmp1_index0: Function0 = local fun () { return Unit } @@ -29,7 +29,7 @@ fun test2(a: Any) { fun test3(a: Any) { { // BLOCK val tmp0_array: Any = a - val tmp1_index0: Function0 = local fun () { + val tmp1_index0: Function0 = local fun () { return Unit } diff --git a/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.kt.txt b/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.kt.txt index d905244704e..82516e8032a 100644 --- a/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.kt.txt +++ b/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.kt.txt @@ -19,28 +19,28 @@ fun id(x: T): T { } fun test1(): @FlexibleNullability String? { - return checkT<@FlexibleNullability String?>(fn = local fun (): @FlexibleNullability String? { + return checkT<@FlexibleNullability String?>(fn = local fun (): @FlexibleNullability String? { return foo() } ) } fun test2(): String { - return checkT<@EnhancedNullability String>(fn = local fun (): @EnhancedNullability String { + return checkT<@EnhancedNullability String>(fn = local fun (): @EnhancedNullability String { return nnFoo() } ) /*!! String */ } fun test3(): @FlexibleNullability String? { - return checkTAny<@FlexibleNullability String?>(fn = local fun (): @FlexibleNullability String? { + return checkTAny<@FlexibleNullability String?>(fn = local fun (): @FlexibleNullability String? { return foo() } ) } fun test4(): String { - return checkTAny<@EnhancedNullability String>(fn = local fun (): @EnhancedNullability String { + return checkTAny<@EnhancedNullability String>(fn = local fun (): @EnhancedNullability String { return nnFoo() } ) /*!! String */ diff --git a/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.kt.txt b/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.kt.txt index d2fd6166b45..ea9036c9ccc 100644 --- a/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.kt.txt +++ b/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.kt.txt @@ -11,42 +11,42 @@ fun id(x: T): T { } fun test1(): Any { - return checkAny(fn = local fun (): Any { + return checkAny(fn = local fun (): Any { return foo() /*!! String */ } ) } val test2: Function0 - field = local fun (): @FlexibleNullability String? { + field = local fun (): @FlexibleNullability String? { return foo() /*!! String */ } get val test3: Function0 - field = local fun (): @FlexibleNullability String? { + field = local fun (): @FlexibleNullability String? { return foo() } as Function0 get val test4: Function0 - field = id>(x = local fun (): @FlexibleNullability String? { + field = id>(x = local fun (): @FlexibleNullability String? { return foo() } ) get fun test5(): Any? { - return checkAnyN(fn = local fun (): Any? { + return checkAnyN(fn = local fun (): Any? { return foo() } ) } fun test6(): Any? { - return checkAnyN(fn = local fun (): Any? { + return checkAnyN(fn = local fun (): Any? { return nnFoo() } ) diff --git a/compiler/testData/ir/irText/expressions/objectReference.kt.txt b/compiler/testData/ir/irText/expressions/objectReference.kt.txt index 14a7bdbe308..2e51824bd98 100644 --- a/compiler/testData/ir/irText/expressions/objectReference.kt.txt +++ b/compiler/testData/ir/irText/expressions/objectReference.kt.txt @@ -44,7 +44,7 @@ object Z { } val aLambda: Function0 - field = local fun () { + field = local fun () { Z.( = 1) Z.foo() Z.( = 1) diff --git a/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.kt.txt b/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.kt.txt index 259f55f1e76..83e01d4ace8 100644 --- a/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.kt.txt +++ b/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.kt.txt @@ -13,7 +13,7 @@ abstract class Base { object Test : Base { private constructor() /* primary */ { - super/*Base*/(lambda = local fun (): Any { + super/*Base*/(lambda = local fun (): Any { return Test } ) diff --git a/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.kt.txt b/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.kt.txt index 71767b36eba..cdddbbbb84f 100644 --- a/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.kt.txt @@ -1,9 +1,9 @@ fun test(fn: Function0, r: Runnable, arr: Array) { - foo1(r = local fun () { + foo1(r = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = arr) /*~> Unit */ - foo1(r = local fun () { + foo1(r = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = [*arr]) /*~> Unit */ @@ -13,55 +13,55 @@ fun test(fn: Function0, r: Runnable, arr: Array) { foo1(r = fn /*-> @FlexibleNullability Runnable? */, strs = arr) /*~> Unit */ foo1(r = fn /*-> @FlexibleNullability Runnable? */, strs = [*arr]) /*~> Unit */ foo1(r = r, strs = [*arr]) /*~> Unit */ - val i1: Test = Test(r = local fun () { + val i1: Test = Test(r = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = arr) - val i2: Test = Test(r = local fun () { + val i2: Test = Test(r = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = [*arr]) - val i3: Test = Test(r1 = local fun () { + val i3: Test = Test(r1 = local fun () { return Unit } - /*-> @FlexibleNullability Runnable? */, r2 = local fun () { + /*-> @FlexibleNullability Runnable? */, r2 = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = arr) - val i4: Test = Test(r1 = r, r2 = local fun () { + val i4: Test = Test(r1 = r, r2 = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = [""]) - val i5: Test = Test(r1 = local fun () { + val i5: Test = Test(r1 = local fun () { return Unit } - /*-> @FlexibleNullability Runnable? */, r2 = local fun () { + /*-> @FlexibleNullability Runnable? */, r2 = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = [*arr]) - val i6: Test = Test(r1 = r, r2 = local fun () { + val i6: Test = Test(r1 = r, r2 = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = [*arr]) - i1.foo2(r1 = local fun () { + i1.foo2(r1 = local fun () { return Unit } - /*-> @FlexibleNullability Runnable? */, r2 = local fun () { + /*-> @FlexibleNullability Runnable? */, r2 = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = arr) /*~> Unit */ - i1.foo2(r1 = r, r2 = local fun () { + i1.foo2(r1 = r, r2 = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = [""]) /*~> Unit */ - i1.foo2(r1 = local fun () { + i1.foo2(r1 = local fun () { return Unit } - /*-> @FlexibleNullability Runnable? */, r2 = local fun () { + /*-> @FlexibleNullability Runnable? */, r2 = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = [*arr]) /*~> Unit */ - i1.foo2(r1 = r, r2 = local fun () { + i1.foo2(r1 = r, r2 = local fun () { return Unit } /*-> @FlexibleNullability Runnable? */, strs = [*arr]) /*~> Unit */ diff --git a/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.kt.txt b/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.kt.txt index 86d7ed9b968..e65d238f5e2 100644 --- a/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.kt.txt @@ -1,13 +1,13 @@ fun test(a: SomeJavaClass) { - a.someFunction(hello = local fun (it: @FlexibleNullability String?) { + a.someFunction(hello = local fun (it: @FlexibleNullability String?) { return Unit } /*-> @FlexibleNullability Hello? */) - a.plus(hello = local fun (it: @FlexibleNullability String?) { + a.plus(hello = local fun (it: @FlexibleNullability String?) { return Unit } /*-> @FlexibleNullability Hello? */) - a.get(hello = local fun (it: @FlexibleNullability String?) { + a.get(hello = local fun (it: @FlexibleNullability String?) { return Unit } /*-> @FlexibleNullability Hello? */) diff --git a/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.kt.txt b/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.kt.txt index 39514e81528..4188588622b 100644 --- a/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.kt.txt @@ -1,7 +1,7 @@ fun f(x: Any): String { when { x is A<*> -> { // BLOCK - return x /*as A */.call(block = local fun (y: Any?): @FlexibleNullability String? { + return x /*as A */.call(block = local fun (y: Any?): @FlexibleNullability String? { return "OK" } /*-> @FlexibleNullability I<@FlexibleNullability T?>? */) /*!! String */ diff --git a/compiler/testData/ir/irText/expressions/sam/samByProjectedType.kt.txt b/compiler/testData/ir/irText/expressions/sam/samByProjectedType.kt.txt index ae78644935d..6a9e49a8d55 100644 --- a/compiler/testData/ir/irText/expressions/sam/samByProjectedType.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samByProjectedType.kt.txt @@ -1,5 +1,5 @@ fun test1() { - bar(j = local fun (x: Any): @FlexibleNullability Any? { + bar(j = local fun (x: Any): @FlexibleNullability Any? { return x } /*-> @FlexibleNullability J<@FlexibleNullability Any?>? */) diff --git a/compiler/testData/ir/irText/expressions/sam/samConstructors.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConstructors.kt.txt index 100df56b438..fc8c8d38ed6 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConstructors.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConstructors.kt.txt @@ -1,5 +1,5 @@ fun test1(): Runnable { - return local fun () { + return local fun () { return Unit } /*-> Runnable */ @@ -17,7 +17,7 @@ fun test3(): Runnable { } fun test4(): Comparator { - return local fun (a: @FlexibleNullability Int?, b: @FlexibleNullability Int?): Int { + return local fun (a: @FlexibleNullability Int?, b: @FlexibleNullability Int?): Int { return a /*!! Int */.minus(other = b /*!! Int */) } /*-> Comparator */ diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.kt.txt index 0b7296342a5..73b504c7621 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.kt.txt @@ -1,19 +1,19 @@ fun test1(): J { - return local fun (x: @FlexibleNullability String?): @FlexibleNullability String? { + return local fun (x: @FlexibleNullability String?): @FlexibleNullability String? { return x } /*-> J */ } fun test2(): J<@FlexibleNullability String?> { - return local fun (x: String): @FlexibleNullability String? { + return local fun (x: String): @FlexibleNullability String? { return x } /*-> J<@FlexibleNullability String?> */ } fun test3() { - return bar<@FlexibleNullability String?>(j = local fun (x: String): @FlexibleNullability String? { + return bar<@FlexibleNullability String?>(j = local fun (x: String): @FlexibleNullability String? { return x } /*-> @FlexibleNullability J<@FlexibleNullability String?>? */) diff --git a/compiler/testData/ir/irText/expressions/sam/samConversions.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConversions.kt.txt index c73f33c98a1..33f0a80faa8 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversions.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversions.kt.txt @@ -4,14 +4,14 @@ fun J.test0(a: Runnable) { } fun test1() { - runStatic(r = local fun () { + runStatic(r = local fun () { test1() } /*-> @FlexibleNullability Runnable? */) } fun J.test2() { - .runIt(r = local fun () { + .runIt(r = local fun () { test1() } /*-> @FlexibleNullability Runnable? */) diff --git a/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.kt.txt b/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.kt.txt index 7e2d3e48b05..4a09c5c254f 100644 --- a/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.kt.txt +++ b/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.kt.txt @@ -14,7 +14,7 @@ fun useSuspendExtT(sfn: @ExtensionFunctionType SuspendFunction1 { - return local fun () { + return local fun () { return Unit } diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt.txt index 04eea7c4fe4..c9ad7813e14 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt.txt @@ -1,5 +1,5 @@ fun String.k(): Function0 { - return local fun (): String { + return local fun (): String { return } diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.kt.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.kt.txt index 21f5ee096a0..3b4191fd644 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.kt.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.kt.txt @@ -1,6 +1,6 @@ val T.gk: Function0 get(): Function0 { - return local fun (): T { + return local fun (): T { return } @@ -12,7 +12,7 @@ fun testGeneric1(x: String): String { val T.kt26531Val: Function0 get(): Function0 { - return local fun (): T { + return local fun (): T { return } diff --git a/compiler/testData/ir/irText/expressions/whenReturnUnit.kt.txt b/compiler/testData/ir/irText/expressions/whenReturnUnit.kt.txt index f4137c00118..1875ccf2e52 100644 --- a/compiler/testData/ir/irText/expressions/whenReturnUnit.kt.txt +++ b/compiler/testData/ir/irText/expressions/whenReturnUnit.kt.txt @@ -2,7 +2,7 @@ fun run(block: Function0) { } fun branch(x: Int) { - return run(block = local fun () { + return run(block = local fun () { { // BLOCK val tmp0_subject: Int = x when { diff --git a/compiler/testData/ir/irText/firProblems/AllCandidates.kt.txt b/compiler/testData/ir/irText/firProblems/AllCandidates.kt.txt index be3662a35fb..991d64e8f53 100644 --- a/compiler/testData/ir/irText/firProblems/AllCandidates.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AllCandidates.kt.txt @@ -21,8 +21,8 @@ class MyCandidate { } private fun allCandidatesResult(allCandidates: Collection): @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>? { - return nameNotFound<@FlexibleNullability A?>().apply<@FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?>(block = local fun @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?.() { - /*!! OverloadResolutionResultsImpl<@FlexibleNullability A?> */.setAllCandidates<@FlexibleNullability A?>(allCandidates = allCandidates.map>(transform = local fun (it: MyCandidate): ResolvedCall { + return nameNotFound<@FlexibleNullability A?>().apply<@FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?>(block = local fun @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?.() { + /*!! OverloadResolutionResultsImpl<@FlexibleNullability A?> */.setAllCandidates<@FlexibleNullability A?>(allCandidates = allCandidates.map>(transform = local fun (it: MyCandidate): ResolvedCall { return it.() as ResolvedCall } )) diff --git a/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.kt.txt b/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.kt.txt index 486ff7b24a4..c0afd6ad93a 100644 --- a/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.kt.txt +++ b/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.kt.txt @@ -46,11 +46,11 @@ class DeepCopyIrTreeWithSymbols { } fun IrTypeParametersContainer.copyTypeParametersFrom(other: IrTypeParametersContainer) { - .( = other.().map(transform = local fun (it: IrTypeParameter): IrTypeParameter { + .( = other.().map(transform = local fun (it: IrTypeParameter): IrTypeParameter { return .copyTypeParameter(declaration = it) } )) - .().withinScope(irTypeParametersContainer = , fn = local fun () { + .().withinScope(irTypeParametersContainer = , fn = local fun () { { // BLOCK val tmp0_iterator: Iterator> = .().zip(other = other.()).iterator() while (tmp0_iterator.hasNext()) { // BLOCK @@ -58,7 +58,7 @@ class DeepCopyIrTreeWithSymbols { val thisTypeParameter: IrTypeParameter = tmp1_loop_parameter.component1() val otherTypeParameter: IrTypeParameter = tmp1_loop_parameter.component2() { // BLOCK - otherTypeParameter.().mapTo>(destination = thisTypeParameter.(), transform = local fun (it: IrType): IrType { + otherTypeParameter.().mapTo>(destination = thisTypeParameter.(), transform = local fun (it: IrType): IrType { return .().remapType(type = it) } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt.txt b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt.txt index 46bec19d53d..2fcb66f1e9a 100644 --- a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt.txt +++ b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt.txt @@ -4,7 +4,7 @@ private const val BACKSLASH: Char private fun Reader.nextChar(): Char? { return { // BLOCK - val tmp0_safe_receiver: Int? = .read().takeUnless(predicate = local fun (it: Int): Boolean { + val tmp0_safe_receiver: Int? = .read().takeUnless(predicate = local fun (it: Int): Boolean { return EQEQ(arg0 = it, arg1 = -1) } ) @@ -26,7 +26,7 @@ fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char) { val tmp0_safe_receiver: Char? = .nextChar() when { EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - true -> tmp0_safe_receiver.let(block = local fun (it: Char): @FlexibleNullability StringBuilder? { + true -> tmp0_safe_receiver.let(block = local fun (it: Char): @FlexibleNullability StringBuilder? { return sb.append(p0 = it) } ) diff --git a/compiler/testData/ir/irText/lambdas/anonymousFunction.kt.txt b/compiler/testData/ir/irText/lambdas/anonymousFunction.kt.txt index 14c11affbd6..4ffcd95ad58 100644 --- a/compiler/testData/ir/irText/lambdas/anonymousFunction.kt.txt +++ b/compiler/testData/ir/irText/lambdas/anonymousFunction.kt.txt @@ -1,5 +1,5 @@ val anonymous: Function0 - field = local fun () { + field = local fun () { println() } diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt index ffea653d202..4a51be9273c 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt @@ -61,7 +61,7 @@ data class A { } var fn: Function1 - field = local fun (: A): Int { + field = local fun (: A): Int { val y: Int = .component2() return 42.plus(other = y) } diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.kt.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.kt.txt index d57df6d9b46..28590b02683 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.kt.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.kt.txt @@ -1,5 +1,5 @@ fun test1(): Int { - return "42".run(block = local fun String.(): Int { + return "42".run(block = local fun String.(): Int { return .() } ) diff --git a/compiler/testData/ir/irText/lambdas/justLambda.kt.txt b/compiler/testData/ir/irText/lambdas/justLambda.kt.txt index a5e160af1e9..f63493e671f 100644 --- a/compiler/testData/ir/irText/lambdas/justLambda.kt.txt +++ b/compiler/testData/ir/irText/lambdas/justLambda.kt.txt @@ -1,12 +1,12 @@ val test1: Function0 - field = local fun (): Int { + field = local fun (): Int { return 42 } get val test2: Function0 - field = local fun () { + field = local fun () { return Unit } diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt.txt index 174418edc75..b79e7d54da4 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt.txt @@ -32,9 +32,9 @@ interface IInvoke { } fun test(fooImpl: IFoo, invokeImpl: IInvoke) { - with(receiver = A, block = local fun A.(): Int { - return with(receiver = fooImpl, block = local fun IFoo.(): Int { - return with(receiver = invokeImpl, block = local fun IInvoke.(): Int { + with(receiver = A, block = local fun A.(): Int { + return with(receiver = fooImpl, block = local fun IFoo.(): Int { + return with(receiver = invokeImpl, block = local fun IInvoke.(): Int { return (, (, ).()).invoke() } ) diff --git a/compiler/testData/ir/irText/lambdas/nonLocalReturn.kt.txt b/compiler/testData/ir/irText/lambdas/nonLocalReturn.kt.txt index fdd258643b5..d8da79eac95 100644 --- a/compiler/testData/ir/irText/lambdas/nonLocalReturn.kt.txt +++ b/compiler/testData/ir/irText/lambdas/nonLocalReturn.kt.txt @@ -1,27 +1,27 @@ fun test0() { - run(block = local fun (): Nothing { + run(block = local fun (): Nothing { return Unit } ) } fun test1() { - run(block = local fun () { + run(block = local fun () { return Unit } ) } fun test2() { - run(block = local fun () { + run(block = local fun () { return Unit } ) } fun test3() { - run(block = local fun () { - run(block = local fun (): Nothing { + run(block = local fun () { + run(block = local fun (): Nothing { return Unit } ) @@ -30,7 +30,7 @@ fun test3() { } fun testLrmFoo1(ints: List) { - ints.forEach(action = local fun (it: Int) { + ints.forEach(action = local fun (it: Int) { when { EQEQ(arg0 = it, arg1 = 0) -> return Unit } @@ -40,7 +40,7 @@ fun testLrmFoo1(ints: List) { } fun testLrmFoo2(ints: List) { - ints.forEach(action = local fun (it: Int) { + ints.forEach(action = local fun (it: Int) { when { EQEQ(arg0 = it, arg1 = 0) -> return Unit } diff --git a/compiler/testData/ir/irText/lambdas/samAdapter.kt.txt b/compiler/testData/ir/irText/lambdas/samAdapter.kt.txt index fa3fe129201..2b51cd1c355 100644 --- a/compiler/testData/ir/irText/lambdas/samAdapter.kt.txt +++ b/compiler/testData/ir/irText/lambdas/samAdapter.kt.txt @@ -1,5 +1,5 @@ fun test1() { - val hello: Runnable = local fun () { + val hello: Runnable = local fun () { println(message = "Hello, world!") } /*-> Runnable */ diff --git a/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.kt.txt b/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.kt.txt index 3c58f6cb39f..2efbc70e543 100644 --- a/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.kt.txt +++ b/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.kt.txt @@ -1,5 +1,5 @@ fun problematic(lss: List>): List { - return lss.flatMap, @FlexibleNullability T?>(transform = local fun (it: List): @EnhancedNullability MutableList<@FlexibleNullability T?> { + return lss.flatMap, @FlexibleNullability T?>(transform = local fun (it: List): @EnhancedNullability MutableList<@FlexibleNullability T?> { return id<@FlexibleNullability T?>(v = it) /*!! List<@FlexibleNullability T?> */ } ) diff --git a/compiler/testData/ir/irText/stubs/builtinMap.kt.txt b/compiler/testData/ir/irText/stubs/builtinMap.kt.txt index 8cef277aeac..d21232d237c 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.kt.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.kt.txt @@ -1,7 +1,7 @@ fun Map.plus(pair: Pair): Map { return when { .isEmpty() -> mapOf(pair = pair) - true -> LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>(p0 = ).apply>(block = local fun LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>.() { + true -> LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>(p0 = ).apply>(block = local fun LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>.() { .put(key = pair.(), value = pair.()) /*~> Unit */ } ) diff --git a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt index d35506ad777..f77bdd8a423 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt @@ -1,8 +1,8 @@ @OptIn(markerClass = [ExperimentalTypeInference::class]) fun scopedFlow(block: @ExtensionFunctionType SuspendFunction2, Unit>): Flow { - return flow(block = local suspend fun FlowCollector.() { + return flow(block = local suspend fun FlowCollector.() { val collector: FlowCollector = - flowScope(block = local suspend fun CoroutineScope.() { + flowScope(block = local suspend fun CoroutineScope.() { block.invoke(p1 = , p2 = collector) } ) @@ -11,7 +11,7 @@ fun scopedFlow(block: @ExtensionFunctionType SuspendFunction2 Flow.onCompletion(action: @ExtensionFunctionType SuspendFunction2, @ParameterName(name = "cause") Throwable?, Unit>): Flow { - return unsafeFlow(block = local suspend fun FlowCollector.() { + return unsafeFlow(block = local suspend fun FlowCollector.() { val safeCollector: SafeCollector = SafeCollector(collector = ) safeCollector.invokeSafely(action = action) } @@ -28,16 +28,16 @@ inline fun unsafeFlow(crossinline block: @ExtensionFunctionType Suspe @Deprecated(message = "binary compatibility with a version w/o FlowCollector receiver", level = DeprecationLevel) fun Flow.onCompletion(action: SuspendFunction1<@ParameterName(name = "cause") Throwable?, Unit>): Flow { - return .onCompletion(action = local suspend fun FlowCollector.(it: Throwable?) { + return .onCompletion(action = local suspend fun FlowCollector.(it: Throwable?) { action.invoke(p1 = it) } ) } private fun CoroutineScope.asFairChannel(flow: Flow<*>): ReceiveChannel { - return .produce(block = local suspend fun ProducerScope.() { + return .produce(block = local suspend fun ProducerScope.() { val channel: ChannelCoroutine = .() as ChannelCoroutine - flow.collect(action = local suspend fun (value: Any?) { + flow.collect(action = local suspend fun (value: Any?) { return channel.sendFair(element = { // BLOCK val tmp0_elvis_lhs: Any? = value when { @@ -52,8 +52,8 @@ private fun CoroutineScope.asFairChannel(flow: Flow<*>): ReceiveChannel { } private fun CoroutineScope.asChannel(flow: Flow<*>): ReceiveChannel { - return .produce(block = local suspend fun ProducerScope.() { - flow.collect(action = local suspend fun (value: Any?) { + return .produce(block = local suspend fun ProducerScope.() { + flow.collect(action = local suspend fun (value: Any?) { return .().send(e = { // BLOCK val tmp0_elvis_lhs: Any? = value when { diff --git a/compiler/testData/ir/irText/types/coercionToUnitInLambdaReturnValue.kt.txt b/compiler/testData/ir/irText/types/coercionToUnitInLambdaReturnValue.kt.txt index 54f08eb9099..e00e3c5c9d1 100644 --- a/compiler/testData/ir/irText/types/coercionToUnitInLambdaReturnValue.kt.txt +++ b/compiler/testData/ir/irText/types/coercionToUnitInLambdaReturnValue.kt.txt @@ -2,7 +2,7 @@ fun use(fn: Function0) { } fun test() { - use(fn = local fun () { + use(fn = local fun () { 42 /*~> Unit */ } ) diff --git a/compiler/testData/ir/irText/types/intersectionType2_NI.kt.txt b/compiler/testData/ir/irText/types/intersectionType2_NI.kt.txt index 574ca44d268..c5e707977d1 100644 --- a/compiler/testData/ir/irText/types/intersectionType2_NI.kt.txt +++ b/compiler/testData/ir/irText/types/intersectionType2_NI.kt.txt @@ -29,7 +29,7 @@ fun run(fn: Function0): T { } fun foo(): Any { - return run(fn = local fun (): Any { + return run(fn = local fun (): Any { val mm: B = B() val nn: C = C() val c: Any = when { diff --git a/compiler/testData/ir/irText/types/intersectionType2_OI.kt.txt b/compiler/testData/ir/irText/types/intersectionType2_OI.kt.txt index 574ca44d268..c5e707977d1 100644 --- a/compiler/testData/ir/irText/types/intersectionType2_OI.kt.txt +++ b/compiler/testData/ir/irText/types/intersectionType2_OI.kt.txt @@ -29,7 +29,7 @@ fun run(fn: Function0): T { } fun foo(): Any { - return run(fn = local fun (): Any { + return run(fn = local fun (): Any { val mm: B = B() val nn: C = C() val c: Any = when { diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsT.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsT.kt.txt index 88a2da6bc36..442115ec2e7 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsT.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsT.kt.txt @@ -3,7 +3,7 @@ fun useT(fn: Function0): T { } fun testNoNullCheck() { - useT<@EnhancedNullability String>(fn = local fun (): @EnhancedNullability String { + useT<@EnhancedNullability String>(fn = local fun (): @EnhancedNullability String { return notNullString() } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTAny.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTAny.kt.txt index 59069d0279c..935f1e0d2bf 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTAny.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTAny.kt.txt @@ -3,7 +3,7 @@ fun useTAny(fn: Function0): T { } fun testNoNullCheck() { - useTAny<@EnhancedNullability String>(fn = local fun (): @EnhancedNullability String { + useTAny<@EnhancedNullability String>(fn = local fun (): @EnhancedNullability String { return notNullString() } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.kt.txt index 7fdb4b1b7aa..4226b825bc4 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.kt.txt @@ -3,7 +3,7 @@ fun useTConstrained(xs: Array, fn: Function0): T { } fun testWithNullCheck(xs: Array) { - useTConstrained(xs = xs, fn = local fun (): String { + useTConstrained(xs = xs, fn = local fun (): String { return notNullString() /*!! String */ } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXArray.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXArray.kt.txt index acd032fcdb5..ad8ddd99515 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXArray.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXArray.kt.txt @@ -3,7 +3,7 @@ fun useTX(x: T, fn: Function0): T { } fun testWithNullCheck(xs: Array) { - useTX(x = xs, fn = local fun (): Serializable { + useTX(x = xs, fn = local fun (): Serializable { return notNullString() /*!! String */ } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXString.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXString.kt.txt index a4457625d58..ed0e42e15b0 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXString.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXString.kt.txt @@ -3,7 +3,7 @@ fun useTX(x: T, fn: Function0): T { } fun testWithNullCheck() { - useTX(x = "", fn = local fun (): String { + useTX(x = "", fn = local fun (): String { return notNullString() /*!! String */ } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.kt.txt index 3fa5e00208b..e56495ebd7e 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.kt.txt @@ -3,7 +3,7 @@ fun useT(fn: Function0): T { } fun testNoNullCheck() { - useT<@FlexibleNullability String?>(fn = local fun (): @FlexibleNullability String? { + useT<@FlexibleNullability String?>(fn = local fun (): @FlexibleNullability String? { return string() } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.kt.txt index 9dadc44a84a..3c0afac7f14 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.kt.txt @@ -3,7 +3,7 @@ fun useTAny(fn: Function0): T { } fun testNoNullCheck() { - useTAny<@FlexibleNullability String?>(fn = local fun (): @FlexibleNullability String? { + useTAny<@FlexibleNullability String?>(fn = local fun (): @FlexibleNullability String? { return string() } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.kt.txt index 1eb947d9c69..5e620e15be3 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.kt.txt @@ -3,7 +3,7 @@ fun useTConstrained(xs: Array, fn: Function0): T { } fun testWithNullCheck(xs: Array) { - useTConstrained(xs = xs, fn = local fun (): String { + useTConstrained(xs = xs, fn = local fun (): String { return string() /*!! String */ } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.kt.txt index ffd23807511..9eb40b33ee2 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.kt.txt @@ -3,7 +3,7 @@ fun useTX(x: T, fn: Function0): T { } fun testNoNullCheck(xs: Array) { - useTX<@FlexibleNullability Serializable?>(x = xs, fn = local fun (): @FlexibleNullability Serializable? { + useTX<@FlexibleNullability Serializable?>(x = xs, fn = local fun (): @FlexibleNullability Serializable? { return string() } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.kt.txt index db333c23664..e5e76be9eb0 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.kt.txt @@ -3,7 +3,7 @@ fun useTX(x: T, fn: Function0): T { } fun testNoNullCheck() { - useTX<@FlexibleNullability String?>(x = "", fn = local fun (): @FlexibleNullability String? { + useTX<@FlexibleNullability String?>(x = "", fn = local fun (): @FlexibleNullability String? { return string() } ) /*~> Unit */