diff --git a/compiler/testData/ir/irText/declarations/annotations/inheritingDeprecation.kt.txt b/compiler/testData/ir/irText/declarations/annotations/inheritingDeprecation.kt.txt new file mode 100644 index 00000000000..e8c7b83bd78 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/annotations/inheritingDeprecation.kt.txt @@ -0,0 +1,63 @@ +interface IFoo { + @Deprecated(message = "") + val prop: String + get(): String { + return "" + } + + @Deprecated(message = "") + val String.extProp: String + get(): String { + return "" + } + +} + +class Delegated : IFoo { + constructor(foo: IFoo) /* primary */ { + super/*Any*/() + /* () */ + + } + + private /*final field*/ val $$delegate_0: IFoo = foo + override val String.extProp: String + override get(): String { + return (.#$$delegate_0, ).() + } + + override val prop: String + override get(): String { + return .#$$delegate_0.() + } + +} + +class DefaultImpl : IFoo { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + +} + +class ExplicitOverride : IFoo { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + override val prop: String + override get(): String { + return "" + } + + override val String.extProp: String + override get(): String { + return "" + } + +} + diff --git a/compiler/testData/ir/irText/expressions/kt37570.kt.txt b/compiler/testData/ir/irText/expressions/kt37570.kt.txt index 9aaad6bc15a..ed1901631b0 100644 --- a/compiler/testData/ir/irText/expressions/kt37570.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt37570.kt.txt @@ -14,7 +14,7 @@ class A { init { a().apply(block = local fun String.() { - .#b = + .#b = $this$apply } ) /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/objectByNameInsideObject.kt.txt b/compiler/testData/ir/irText/expressions/objectByNameInsideObject.kt.txt new file mode 100644 index 00000000000..a0a73d61825 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/objectByNameInsideObject.kt.txt @@ -0,0 +1,33 @@ +open class Base { + constructor(f1: Function0) /* primary */ { + super/*Any*/() + /* () */ + + } + + val f1: Function0 + field = f1 + get + +} + +object Thing : Base { + private constructor() /* primary */ { + super/*Base*/(f1 = local fun (): Any { + return Thing + } +) + /* () */ + + } + + fun test1(): Thing { + return Thing + } + + fun test2(): Thing { + return + } + +} + diff --git a/compiler/testData/ir/irText/firProblems/AllCandidates.kt.txt b/compiler/testData/ir/irText/firProblems/AllCandidates.kt.txt index 05f10d40798..0ace4e94f32 100644 --- a/compiler/testData/ir/irText/firProblems/AllCandidates.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AllCandidates.kt.txt @@ -22,7 +22,7 @@ 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 { + $this$apply /*!! 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/throwableStackTrace.kt.txt b/compiler/testData/ir/irText/firProblems/throwableStackTrace.kt.txt new file mode 100644 index 00000000000..d1a6dd83c81 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/throwableStackTrace.kt.txt @@ -0,0 +1,4 @@ +fun foo(t: Throwable) { + t.setStackTrace(p0 = t.getStackTrace()) +} + diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.kt.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.kt.txt index 28590b02683..b353ca3f2b1 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.kt.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.kt.txt @@ -1,6 +1,6 @@ fun test1(): Int { return "42".run(block = local fun String.(): Int { - return .() + return $this$run.() } ) } diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt.txt index 994146b75c1..c44b81ee74d 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt.txt @@ -35,7 +35,7 @@ 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 { - return (, (, ).()).invoke() + return ($this$with, ($this$with, $this$with).()).invoke() } ) } diff --git a/compiler/testData/ir/irText/stubs/builtinMap.kt.txt b/compiler/testData/ir/irText/stubs/builtinMap.kt.txt index 1d81be4db90..ab00f71891f 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.kt.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.kt.txt @@ -2,7 +2,7 @@ fun Map.plus(pair: Pair): Map return when { .isEmpty() -> mapOf(pair = pair) else -> LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>(p0 = ).apply>(block = local fun LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>.() { - .put(key = pair.(), value = pair.()) /*~> Unit */ + $this$apply.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 c48ec96ef9d..149e016f412 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt @@ -1,9 +1,9 @@ @OptIn(markerClass = [ExperimentalTypeInference::class]) fun scopedFlow(@BuilderInference block: @ExtensionFunctionType SuspendFunction2, Unit>): Flow { return flow(block = local suspend fun FlowCollector.() { - val collector: FlowCollector = + val collector: FlowCollector = $this$flow flowScope(block = local suspend fun CoroutineScope.() { - block.invoke(p1 = , p2 = collector) + block.invoke(p1 = $this$flowScope, p2 = collector) } ) } @@ -12,7 +12,7 @@ fun scopedFlow(@BuilderInference block: @ExtensionFunctionType Suspen fun Flow.onCompletion(action: @ExtensionFunctionType SuspendFunction2, @ParameterName(name = "cause") Throwable?, Unit>): Flow { return unsafeFlow(block = local suspend fun FlowCollector.() { - val safeCollector: SafeCollector = SafeCollector(collector = ) + val safeCollector: SafeCollector = SafeCollector(collector = $this$unsafeFlow) safeCollector.invokeSafely(action = action) } ) @@ -36,7 +36,7 @@ fun Flow.onCompletion(action: SuspendFunction1<@ParameterName(name private fun CoroutineScope.asFairChannel(flow: Flow<*>): ReceiveChannel { return .produce(block = local suspend fun ProducerScope.() { - val channel: ChannelCoroutine = .() as ChannelCoroutine + val channel: ChannelCoroutine = $this$produce.() as ChannelCoroutine flow.collect(action = local suspend fun (value: Any?) { return channel.sendFair(element = { // BLOCK val tmp0_elvis_lhs: Any? = value @@ -54,7 +54,7 @@ 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 .().send(e = { // BLOCK + return $this$produce.().send(e = { // BLOCK val tmp0_elvis_lhs: Any? = value when { EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> Any()