From b8e1e5e68d839c3b746d10b0e700f8c34a458d30 Mon Sep 17 00:00:00 2001 From: ForteScarlet Date: Sun, 6 Oct 2024 00:06:32 +0800 Subject: [PATCH 1/2] optimize: overridden for synthetic functions. see #67 --- buildSrc/src/main/kotlin/IProject.kt | 2 +- .../fir/SuspendTransformFirTransformer.kt | 323 ++++++++- .../runners/CodeGenTestRunnerGenerated.java | 12 + .../testData/codegen/implOverriden.asm.txt | 297 ++++++++ .../testData/codegen/implOverriden.fir.ir.txt | 469 +++++++++++++ .../testData/codegen/implOverriden.fir.txt | 127 ++++ .../src/testData/codegen/implOverriden.kt | 74 ++ .../codegen/implOverridenGeneric.asm.txt | 451 ++++++++++++ .../codegen/implOverridenGeneric.fir.ir.txt | 657 ++++++++++++++++++ .../codegen/implOverridenGeneric.fir.txt | 145 ++++ .../testData/codegen/implOverridenGeneric.kt | 83 +++ tests/test-js/build.gradle.kts | 3 +- .../test-js/src/jsMain/kotlin/FooInterface.kt | 80 +++ tests/test-jvm/build.gradle.kts | 2 +- .../suspendtrans/sample/FooInterface.kt | 74 ++ 15 files changed, 2765 insertions(+), 34 deletions(-) create mode 100644 compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.asm.txt create mode 100644 compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.fir.ir.txt create mode 100644 compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.fir.txt create mode 100644 compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.kt create mode 100644 compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.asm.txt create mode 100644 compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.fir.ir.txt create mode 100644 compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.fir.txt create mode 100644 compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.kt create mode 100644 tests/test-js/src/jsMain/kotlin/FooInterface.kt create mode 100644 tests/test-jvm/src/main/kotlin/love/forte/plugin/suspendtrans/sample/FooInterface.kt diff --git a/buildSrc/src/main/kotlin/IProject.kt b/buildSrc/src/main/kotlin/IProject.kt index 8ce14a8..8a66854 100644 --- a/buildSrc/src/main/kotlin/IProject.kt +++ b/buildSrc/src/main/kotlin/IProject.kt @@ -11,7 +11,7 @@ object IProject : ProjectDetail() { // Remember the libs.versions.toml! val ktVersion = "2.1.0-Beta1" - val pluginVersion = "0.9.2" + val pluginVersion = "0.9.3" override val version: String = "$ktVersion-$pluginVersion" diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt index 510a5d1..74c7279 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt @@ -7,6 +7,10 @@ import love.forte.plugin.suspendtrans.utils.toClassId import love.forte.plugin.suspendtrans.utils.toInfo import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.fir.FirSession +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext +import org.jetbrains.kotlin.fir.analysis.checkers.context.MutableCheckerContext +import org.jetbrains.kotlin.fir.analysis.checkers.getContainingClassSymbol +import org.jetbrains.kotlin.fir.analysis.checkers.processOverriddenFunctions import org.jetbrains.kotlin.fir.caches.FirCache import org.jetbrains.kotlin.fir.caches.firCachesFactory import org.jetbrains.kotlin.fir.caches.getValue @@ -16,6 +20,9 @@ import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.builder.buildProperty import org.jetbrains.kotlin.fir.declarations.builder.buildPropertyAccessor import org.jetbrains.kotlin.fir.declarations.builder.buildSimpleFunctionCopy +import org.jetbrains.kotlin.fir.declarations.builder.buildTypeParameterCopy +import org.jetbrains.kotlin.fir.declarations.utils.isFinal +import org.jetbrains.kotlin.fir.declarations.utils.isOverride import org.jetbrains.kotlin.fir.declarations.utils.isSuspend import org.jetbrains.kotlin.fir.declarations.utils.modality import org.jetbrains.kotlin.fir.expressions.FirAnnotation @@ -26,13 +33,16 @@ import org.jetbrains.kotlin.fir.extensions.FirDeclarationPredicateRegistrar import org.jetbrains.kotlin.fir.extensions.MemberGenerationContext import org.jetbrains.kotlin.fir.extensions.predicate.DeclarationPredicate import org.jetbrains.kotlin.fir.plugin.createConeType +import org.jetbrains.kotlin.fir.resolve.ScopeSession +import org.jetbrains.kotlin.fir.resolve.SessionHolderImpl +import org.jetbrains.kotlin.fir.resolve.getSuperTypes +import org.jetbrains.kotlin.fir.resolve.toRegularClassSymbol +import org.jetbrains.kotlin.fir.resolve.transformers.ReturnTypeCalculatorForFullBodyResolve import org.jetbrains.kotlin.fir.scopes.impl.FirClassDeclaredMemberScope import org.jetbrains.kotlin.fir.scopes.processAllFunctions +import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.symbols.SymbolInternals -import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol -import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol -import org.jetbrains.kotlin.fir.symbols.impl.FirPropertyAccessorSymbol -import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol +import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef @@ -48,6 +58,7 @@ import org.jetbrains.kotlin.platform.konan.isNative import org.jetbrains.kotlin.types.ConstantValueKind import java.util.concurrent.ConcurrentHashMap + /** * * @author ForteScarlet @@ -57,12 +68,18 @@ class SuspendTransformFirTransformer( private val suspendTransformConfiguration: SuspendTransformConfiguration ) : FirDeclarationGenerationExtension(session) { + private data class FirCacheKey( + val classSymbol: FirClassSymbol<*>, + val memberScope: FirClassDeclaredMemberScope? + ) + private data class FunData( val annotationData: TransformAnnotationData, - val transformer: Transformer + val transformer: Transformer, ) - private val cache: FirCache, FirClassDeclaredMemberScope?>, Map>?, Nothing?> = + // private val cache: FirCache, FirClassDeclaredMemberScope?>, Map>?, Nothing?> = + private val cache: FirCache>?, Nothing?> = session.firCachesFactory.createCache { (symbol, scope), c -> createCache(symbol, scope) } @@ -71,7 +88,7 @@ class SuspendTransformFirTransformer( override fun getCallableNamesForClass(classSymbol: FirClassSymbol<*>, context: MemberGenerationContext): Set { val names = mutableSetOf() - cache.getValue(classSymbol to context.declaredScope)?.forEach { (_, map) -> + cache.getValue(FirCacheKey(classSymbol, context.declaredScope))?.forEach { (_, map) -> map.values.forEach { names.add(Name.identifier(it.annotationData.functionName)) } } @@ -84,11 +101,23 @@ class SuspendTransformFirTransformer( context: MemberGenerationContext? ): List { val owner = context?.owner ?: return emptyList() - val funcMap = cache.getValue(owner to context.declaredScope)?.get(callableId.callableName) ?: return emptyList() + val funcMap = cache.getValue(FirCacheKey(owner, context.declaredScope)) + ?.get(callableId.callableName) + ?: return emptyList() val funList = mutableListOf() + val scope = ScopeSession() + val holder = SessionHolderImpl(session, scope) + val checkContext = MutableCheckerContext( + holder, + ReturnTypeCalculatorForFullBodyResolve.Default, + ) + funcMap.forEach { (func, funData) -> + // Check the overridden for isOverride based on source function (func) 's overridden + val isOverride = checkSyntheticFunctionIsOverrideBasedOnSourceFunction(funData, func, checkContext) + val annotationData = funData.annotationData if (!annotationData.asProperty) { // generate @@ -97,15 +126,37 @@ class SuspendTransformFirTransformer( val (functionAnnotations, _) = copyAnnotations(originFunc, funData) + val newFunSymbol = FirNamedFunctionSymbol(callableId) + val newFun = buildSimpleFunctionCopy(originFunc) { name = callableId.callableName - val newFunSymbol = FirNamedFunctionSymbol(callableId) symbol = newFunSymbol status = originFunc.status.copy( isSuspend = false, - modality = originFunc.syntheticModifier + modality = originFunc.syntheticModifier, + // Use OPEN and `override` is unnecessary. .. ... Maybe? + isOverride = isOverride || isOverridable( + session, + callableId.callableName, + originFunc, + owner, + isProperty = false, + ), ) + // Copy the typeParameters. + // Otherwise, in functions like the following, an error will occur + // suspend fun data(value: A): T = ... + // Functions for which function-scoped generalizations (``) exist. + // In the generated IR, data and dataBlocking will share an `A`, generating the error. + // The error: Duplicate IR node + // [IR VALIDATION] JvmIrValidationBeforeLoweringPhase: Duplicate IR node: TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false of FUN GENERATED[...] + typeParameters.replaceAll { + buildTypeParameterCopy(it) { + symbol = FirTypeParameterSymbol() + } + } + annotations.clear() annotations.addAll(functionAnnotations) body = null @@ -132,7 +183,6 @@ class SuspendTransformFirTransformer( } } - return funList } @@ -142,11 +192,23 @@ class SuspendTransformFirTransformer( context: MemberGenerationContext? ): List { val owner = context?.owner ?: return emptyList() - val funcMap = cache.getValue(owner to context.declaredScope)?.get(callableId.callableName) ?: return emptyList() + val funcMap = cache.getValue(FirCacheKey(owner, context.declaredScope)) + ?.get(callableId.callableName) + ?: return emptyList() val propList = mutableListOf() + val scope = ScopeSession() + val holder = SessionHolderImpl(session, scope) + val checkContext = MutableCheckerContext( + holder, + ReturnTypeCalculatorForFullBodyResolve.Contract, + ) + funcMap.forEach { (func, funData) -> + + val isOverride = checkSyntheticFunctionIsOverrideBasedOnSourceFunction(funData, func, checkContext) + val annotationData = funData.annotationData if (annotationData.asProperty) { // generate @@ -210,7 +272,15 @@ class SuspendTransformFirTransformer( isInner = false, // modality = if (original.status.isOverride) Modality.OPEN else original.status.modality, modality = original.syntheticModifier, + isOverride = isOverride || isOverridable( + session, + callableId.callableName, + original, + owner, + isProperty = true + ), ) + isVar = false isLocal = false returnTypeRef = returnType @@ -245,6 +315,7 @@ class SuspendTransformFirTransformer( isFun = false, isInner = false, modality = original.syntheticModifier, + isOverride = false, // funData.isOverride, // visibility = this@buildProperty.status ) returnTypeRef = original.returnTypeRef @@ -266,6 +337,68 @@ class SuspendTransformFirTransformer( return propList } + private fun checkSyntheticFunctionIsOverrideBasedOnSourceFunction( + funData: FunData, + func: FirNamedFunctionSymbol, + checkContext: CheckerContext + ): Boolean { + // Check the overridden for isOverride based on source function (func) 's overridden + var isOverride = false + val annoData = funData.annotationData + val markAnnotation = funData.transformer.markAnnotation + + if (func.isOverride && !isOverride) { + func.processOverriddenFunctions( + checkContext + ) processOverridden@{ overriddenFunction -> + if (!isOverride) { + // check parameters and receivers + val symbolReceiver = overriddenFunction.receiverParameter + val originReceiver = func.receiverParameter + + // origin receiver should be the same as symbol receiver + if (originReceiver?.typeRef != symbolReceiver?.typeRef) { + return@processOverridden + } + + // all value parameters should be a subtype of symbol's value parameters + val symbolParameterSymbols = overriddenFunction.valueParameterSymbols + val originParameterSymbols = func.valueParameterSymbols + + if (symbolParameterSymbols.size != originParameterSymbols.size) { + return@processOverridden + } + + for ((index, symbolParameter) in symbolParameterSymbols.withIndex()) { + val originParameter = originParameterSymbols[index] + if ( + originParameter.resolvedReturnType != symbolParameter.resolvedReturnType + ) { + return@processOverridden + } + } + + val overriddenAnnotation = firAnnotation( + overriddenFunction, markAnnotation, overriddenFunction.getContainingClassSymbol() + ) ?: return@processOverridden + + val overriddenAnnoData = overriddenAnnotation.toTransformAnnotationData( + markAnnotation, overriddenFunction.name.asString() + ) + + // Same functionName, same asProperty, the generated synthetic function will be same too. + if ( + overriddenAnnoData.functionName == annoData.functionName + && overriddenAnnoData.asProperty == annoData.asProperty + ) { + isOverride = true + } + } + } + } + return isOverride + } + private val annotationPredicates = DeclarationPredicate.create { var predicate: DeclarationPredicate? = null for (value in suspendTransformConfiguration.transformers.values) { @@ -321,14 +454,7 @@ class SuspendTransformFirTransformer( for (transformer in transformerList) { val markAnnotation = transformer.markAnnotation - val anno = func.resolvedAnnotationsWithArguments.getAnnotationsByClassId( - markAnnotation.classId, - session - ).firstOrNull() - ?: classSymbol.resolvedAnnotationsWithArguments.getAnnotationsByClassId( - markAnnotation.classId, - session - ).firstOrNull() + val anno = firAnnotation(func, markAnnotation, classSymbol) ?: continue @@ -337,18 +463,10 @@ class SuspendTransformFirTransformer( // 使用 argumentMapping.mapping 获取不到结果 // println("RAW AnnoData: ${anno.argumentMapping.mapping}") - val annoData = TransformAnnotationData.of( - this.session, - firAnnotation = anno, - annotationBaseNamePropertyName = markAnnotation.baseNameProperty, - annotationSuffixPropertyName = markAnnotation.suffixProperty, - annotationAsPropertyPropertyName = markAnnotation.asPropertyProperty, - defaultBaseName = functionName, - defaultSuffix = markAnnotation.defaultSuffix, - defaultAsProperty = markAnnotation.defaultAsProperty, - ) + val annoData = anno.toTransformAnnotationData(markAnnotation, functionName) - map.computeIfAbsent(Name.identifier(annoData.functionName)) { ConcurrentHashMap() }[func] = + val syntheticFunName = Name.identifier(annoData.functionName) + map.computeIfAbsent(syntheticFunName) { ConcurrentHashMap() }[func] = FunData(annoData, transformer) } } @@ -357,6 +475,33 @@ class SuspendTransformFirTransformer( return map } + private fun FirAnnotation.toTransformAnnotationData( + markAnnotation: MarkAnnotation, + sourceFunctionName: String + ) = TransformAnnotationData.of( + session, + firAnnotation = this, + annotationBaseNamePropertyName = markAnnotation.baseNameProperty, + annotationSuffixPropertyName = markAnnotation.suffixProperty, + annotationAsPropertyPropertyName = markAnnotation.asPropertyProperty, + defaultBaseName = sourceFunctionName, + defaultSuffix = markAnnotation.defaultSuffix, + defaultAsProperty = markAnnotation.defaultAsProperty, + ) + + private fun firAnnotation( + func: FirNamedFunctionSymbol, + markAnnotation: MarkAnnotation, + classSymbol: FirBasedSymbol<*>? + ) = func.resolvedAnnotationsWithArguments.getAnnotationsByClassId( + markAnnotation.classId, + session + ).firstOrNull() + ?: classSymbol?.resolvedAnnotationsWithArguments?.getAnnotationsByClassId( + markAnnotation.classId, + session + )?.firstOrNull() + private fun resolveReturnType(original: FirSimpleFunction, funData: FunData): FirTypeRef { val resultConeType = resolveReturnConeType(original, funData) @@ -544,6 +689,122 @@ class SuspendTransformFirTransformer( }) } } + + + private fun isOverridable( + session: FirSession, + functionName: Name, + thisReceiverTypeRef: FirTypeRef?, + thisValueTypeRefs: List, + owner: FirClassSymbol<*>, + isProperty: Boolean, + ): Boolean { + + if (isProperty) { + // value symbols must be empty. + check(thisValueTypeRefs.isEmpty()) { "property's value parameters must be empty." } + + return owner.getSuperTypes(session) + .asSequence() + .mapNotNull { + it.toRegularClassSymbol(session) + } + .flatMap { + it.declarationSymbols.filterIsInstance() + } + .filter { !it.isFinal } + .filter { it.callableId.callableName == functionName } + // overridable receiver parameter. + .filter { + thisReceiverTypeRef sameAs it.receiverParameter?.typeRef + } + .any() + } else { + return owner.getSuperTypes(session) + .asSequence() + .mapNotNull { + it.toRegularClassSymbol(session) + } + .flatMap { + it.declarationSymbols.filterIsInstance() + } + // not final, overridable + .filter { !it.isFinal } + // same name + .filter { it.callableId.callableName == functionName } + // overridable receiver parameter. + .filter { + thisReceiverTypeRef sameAs it.receiverParameter?.typeRef + } + // overridable value parameters + .filter { + val valuePs = it.valueParameterSymbols + .map { vps -> + vps.resolvedReturnTypeRef + } + + if (valuePs.size != thisValueTypeRefs.size) return@filter false + + for (i in valuePs.indices) { + val valueP = valuePs[i] + val thisP = thisValueTypeRefs[i] + + if (thisP notSameAs valueP) { + return@filter false + } + } + + true + } + .any() + } + } + + private fun isOverridable( + session: FirSession, + functionName: Name, + originFunc: FirSimpleFunction, + owner: FirClassSymbol<*>, + isProperty: Boolean = false, + ): Boolean { + // 寻找 owner 中所有的 open/abstract的, + // parameters 的类型跟 originFunc 的 parameters 匹配的 + + val thisReceiverTypeRef: FirTypeRef? = originFunc.receiverParameter?.typeRef + + val thisValueTypeRefs: List = originFunc.valueParameters.map { + it.symbol.resolvedReturnTypeRef + } + + return isOverridable(session, functionName, thisReceiverTypeRef, thisValueTypeRefs, owner, isProperty) + } + + /** + * Check is an overridable same type for a function's parameters. + * + */ + private infix fun FirTypeRef?.sameAs(otherSuper: FirTypeRef?): Boolean { + if (this == otherSuper) return true + val thisConeType = this?.coneTypeOrNull + val otherConeType = otherSuper?.coneTypeOrNull + + if (thisConeType == otherConeType) return true + + if (thisConeType == null || otherConeType == null) { + // One this null, other is not null + return false + } + + return thisConeType sameAs otherConeType + } + + private infix fun ConeKotlinType.sameAs(otherSuper: ConeKotlinType): Boolean { + return this == otherSuper + // 有什么便捷的方法来处理 ConeTypeParameterType ? + } + + private infix fun FirTypeRef?.notSameAs(otherSuper: FirTypeRef?): Boolean = !(this sameAs otherSuper) + } diff --git a/compiler/suspend-transform-plugin/src/test-gen/love/forte/plugin/suspendtrans/runners/CodeGenTestRunnerGenerated.java b/compiler/suspend-transform-plugin/src/test-gen/love/forte/plugin/suspendtrans/runners/CodeGenTestRunnerGenerated.java index e4f20de..91136d7 100644 --- a/compiler/suspend-transform-plugin/src/test-gen/love/forte/plugin/suspendtrans/runners/CodeGenTestRunnerGenerated.java +++ b/compiler/suspend-transform-plugin/src/test-gen/love/forte/plugin/suspendtrans/runners/CodeGenTestRunnerGenerated.java @@ -49,4 +49,16 @@ public void testTypeAttr() { public void testOpt() { runTest("src/testData/codegen/opt.kt"); } + + @Test + @TestMetadata("implOverriden.kt") + public void testImplOverriden() { + runTest("src/testData/codegen/implOverriden.kt"); + } + + @Test + @TestMetadata("implOverridenGeneric.kt") + public void testImplOverridenGeneric() { + runTest("src/testData/codegen/implOverridenGeneric.kt"); + } } diff --git a/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.asm.txt b/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.asm.txt new file mode 100644 index 0000000..b161c51 --- /dev/null +++ b/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.asm.txt @@ -0,0 +1,297 @@ +public abstract interface FooInterface1 : java/lang/Object { + public abstract java.lang.Object data(kotlin.coroutines.Continuation p0) + + public abstract java.lang.Object data2(int p0, kotlin.coroutines.Continuation p1) + + public abstract java.lang.Object data3(int p0, kotlin.coroutines.Continuation p1) +} + +final class FooInterface1Impl$data2Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $value + + int label + + final FooInterface1Impl this$0 + + void (FooInterface1Impl $receiver, int $value, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface1Impl$data3Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $this_data3Blocking + + int label + + final FooInterface1Impl this$0 + + void (FooInterface1Impl $receiver, int $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface1Impl$dataBlocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + int label + + final FooInterface1Impl this$0 + + void (FooInterface1Impl $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +public final class FooInterface1Impl : java/lang/Object, FooInterface1 { + public void () + + public java.lang.Object data(kotlin.coroutines.Continuation $completion) + + public java.lang.Object data2(int value, kotlin.coroutines.Continuation $completion) + + public java.lang.String data2Blocking(int value) + + public java.lang.Object data3(int $this$data3, kotlin.coroutines.Continuation $completion) + + public java.lang.String data3Blocking(int $this$data3Blocking) + + public java.lang.String dataBlocking() +} + +public final class FooInterface2$DefaultImpls : java/lang/Object { + public static java.lang.String data2Blocking(FooInterface2 $this, int value) + + public static java.lang.String data3Blocking(FooInterface2 $this, int $receiver) + + public static java.lang.String dataBlocking(FooInterface2 $this) +} + +public abstract interface FooInterface2 : java/lang/Object { + public abstract java.lang.Object data(kotlin.coroutines.Continuation p0) + + public abstract java.lang.Object data2(int p0, kotlin.coroutines.Continuation p1) + + public abstract java.lang.String data2Blocking(int p0) + + public abstract java.lang.Object data3(int p0, kotlin.coroutines.Continuation p1) + + public abstract java.lang.String data3Blocking(int p0) + + public abstract java.lang.String dataBlocking() +} + +final class FooInterface2Impl$data2Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $value + + int label + + final FooInterface2Impl this$0 + + void (FooInterface2Impl $receiver, int $value, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface2Impl$data3Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $this_data3Blocking + + int label + + final FooInterface2Impl this$0 + + void (FooInterface2Impl $receiver, int $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface2Impl$dataBlocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + int label + + final FooInterface2Impl this$0 + + void (FooInterface2Impl $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +public final class FooInterface2Impl : java/lang/Object, FooInterface2 { + public void () + + public java.lang.Object data(kotlin.coroutines.Continuation $completion) + + public java.lang.Object data2(int value, kotlin.coroutines.Continuation $completion) + + public java.lang.String data2Blocking(int value) + + public java.lang.Object data3(int $this$data3, kotlin.coroutines.Continuation $completion) + + public java.lang.String data3Blocking(int $this$data3Blocking) + + public java.lang.String dataBlocking() +} + +public final class FooInterface3$DefaultImpls : java/lang/Object { + public static java.lang.String getDataBlocking(FooInterface3 $this) +} + +public abstract interface FooInterface3 : java/lang/Object { + public abstract java.lang.Object data(kotlin.coroutines.Continuation p0) + + public abstract java.lang.String getDataBlocking() +} + +final class FooInterface3Impl$dataBlocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + int label + + final FooInterface3Impl this$0 + + void (FooInterface3Impl $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +public final class FooInterface3Impl : java/lang/Object, FooInterface3 { + public void () + + public java.lang.Object data(kotlin.coroutines.Continuation $completion) + + public java.lang.String getDataBlocking() + + public static void getDataBlocking$annotations() +} + +public final class FooInterface4$DefaultImpls : java/lang/Object { + public static java.lang.String data2Blocking(FooInterface4 $this, int value) + + public static java.lang.String dataBlocking(FooInterface4 $this) +} + +final class FooInterface4$data2Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $value + + int label + + final FooInterface4 this$0 + + void (FooInterface4 $receiver, int $value, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface4$dataBlocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + int label + + final FooInterface4 this$0 + + void (FooInterface4 $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +public abstract interface FooInterface4 : java/lang/Object { + public abstract java.lang.Object data(kotlin.coroutines.Continuation p0) + + public abstract java.lang.Object data2(int p0, kotlin.coroutines.Continuation p1) + + public abstract java.lang.String data2Blocking(int p0) + + public abstract java.lang.String dataBlocking() +} + +final class FooInterface4Impl$data2Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $value + + int label + + final FooInterface4Impl this$0 + + void (FooInterface4Impl $receiver, int $value, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface4Impl$dataBlocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + int label + + final FooInterface4Impl this$0 + + void (FooInterface4Impl $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +public final class FooInterface4Impl : java/lang/Object, FooInterface4 { + public void () + + public java.lang.Object data(kotlin.coroutines.Continuation $completion) + + public java.lang.Object data2(int value, kotlin.coroutines.Continuation $completion) + + public java.lang.String data2Blocking(int value) + + public java.lang.String dataBlocking() +} diff --git a/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.fir.ir.txt b/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.fir.ir.txt new file mode 100644 index 0000000..ef44f46 --- /dev/null +++ b/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.fir.ir.txt @@ -0,0 +1,469 @@ +FILE fqName: fileName:/Main.kt + CLASS CLASS name:FooInterface1Impl modality:FINAL visibility:public superTypes:[.FooInterface1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface1Impl + CONSTRUCTOR visibility:public <> () returnType:.FooInterface1Impl [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:FooInterface1Impl modality:FINAL visibility:public superTypes:[.FooInterface1]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .FooInterface1 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .FooInterface1 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .FooInterface1 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data2Blocking visibility:public modality:OPEN <> ($this:.FooInterface1Impl, value:kotlin.Int) returnType:kotlin.String + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface1Impl + VALUE_PARAMETER name:value index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2Blocking (value: kotlin.Int): kotlin.String declared in .FooInterface1Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .FooInterface1Impl.data2Blocking' + CALL 'public open fun data2 (value: kotlin.Int): kotlin.String declared in .FooInterface1Impl' type=kotlin.String origin=null + $this: GET_VAR ': .FooInterface1Impl declared in .FooInterface1Impl.data2Blocking' type=.FooInterface1Impl origin=null + value: GET_VAR 'value: kotlin.Int declared in .FooInterface1Impl.data2Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data3Blocking visibility:public modality:OPEN <> ($this:.FooInterface1Impl, $receiver:kotlin.Int) returnType:kotlin.String + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface1Impl + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3Blocking (): kotlin.String declared in .FooInterface1Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .FooInterface1Impl.data3Blocking' + CALL 'public open fun data3 (): kotlin.String declared in .FooInterface1Impl' type=kotlin.String origin=null + $this: GET_VAR ': .FooInterface1Impl declared in .FooInterface1Impl.data3Blocking' type=.FooInterface1Impl origin=null + $receiver: GET_VAR ': kotlin.Int declared in .FooInterface1Impl.data3Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN <> ($this:.FooInterface1Impl) returnType:kotlin.String + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface1Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun dataBlocking (): kotlin.String declared in .FooInterface1Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .FooInterface1Impl.dataBlocking' + CALL 'public open fun data (): kotlin.String declared in .FooInterface1Impl' type=kotlin.String origin=null + $this: GET_VAR ': .FooInterface1Impl declared in .FooInterface1Impl.dataBlocking' type=.FooInterface1Impl origin=null + FUN name:data visibility:public modality:OPEN <> ($this:.FooInterface1Impl) returnType:kotlin.String [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data (): kotlin.String declared in .FooInterface1 + $this: VALUE_PARAMETER name: type:.FooInterface1Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data (): kotlin.String declared in .FooInterface1Impl' + CONST String type=kotlin.String value="" + FUN name:data2 visibility:public modality:OPEN <> ($this:.FooInterface1Impl, value:kotlin.Int) returnType:kotlin.String [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data2 (value: kotlin.Int): kotlin.String declared in .FooInterface1 + $this: VALUE_PARAMETER name: type:.FooInterface1Impl + VALUE_PARAMETER name:value index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2 (value: kotlin.Int): kotlin.String declared in .FooInterface1Impl' + CONST String type=kotlin.String value="" + FUN name:data3 visibility:public modality:OPEN <> ($this:.FooInterface1Impl, $receiver:kotlin.Int) returnType:kotlin.String [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data3 (): kotlin.String declared in .FooInterface1 + $this: VALUE_PARAMETER name: type:.FooInterface1Impl + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3 (): kotlin.String declared in .FooInterface1Impl' + CONST String type=kotlin.String value="" + CLASS CLASS name:FooInterface2Impl modality:FINAL visibility:public superTypes:[.FooInterface2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface2Impl + CONSTRUCTOR visibility:public <> () returnType:.FooInterface2Impl [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:FooInterface2Impl modality:FINAL visibility:public superTypes:[.FooInterface2]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data2Blocking visibility:public modality:OPEN <> ($this:.FooInterface2Impl, value:kotlin.Int) returnType:kotlin.String + annotations: + Api4J + overridden: + public open fun data2Blocking (value: kotlin.Int): kotlin.String declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:.FooInterface2Impl + VALUE_PARAMETER name:value index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2Blocking (value: kotlin.Int): kotlin.String declared in .FooInterface2Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .FooInterface2Impl.data2Blocking' + CALL 'public open fun data2 (value: kotlin.Int): kotlin.String declared in .FooInterface2Impl' type=kotlin.String origin=null + $this: GET_VAR ': .FooInterface2Impl declared in .FooInterface2Impl.data2Blocking' type=.FooInterface2Impl origin=null + value: GET_VAR 'value: kotlin.Int declared in .FooInterface2Impl.data2Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data3Blocking visibility:public modality:OPEN <> ($this:.FooInterface2Impl, $receiver:kotlin.Int) returnType:kotlin.String + annotations: + Api4J + overridden: + public open fun data3Blocking (): kotlin.String declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:.FooInterface2Impl + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3Blocking (): kotlin.String declared in .FooInterface2Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .FooInterface2Impl.data3Blocking' + CALL 'public open fun data3 (): kotlin.String declared in .FooInterface2Impl' type=kotlin.String origin=null + $this: GET_VAR ': .FooInterface2Impl declared in .FooInterface2Impl.data3Blocking' type=.FooInterface2Impl origin=null + $receiver: GET_VAR ': kotlin.Int declared in .FooInterface2Impl.data3Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN <> ($this:.FooInterface2Impl) returnType:kotlin.String + annotations: + Api4J + overridden: + public open fun dataBlocking (): kotlin.String declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:.FooInterface2Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun dataBlocking (): kotlin.String declared in .FooInterface2Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .FooInterface2Impl.dataBlocking' + CALL 'public open fun data (): kotlin.String declared in .FooInterface2Impl' type=kotlin.String origin=null + $this: GET_VAR ': .FooInterface2Impl declared in .FooInterface2Impl.dataBlocking' type=.FooInterface2Impl origin=null + FUN name:data visibility:public modality:OPEN <> ($this:.FooInterface2Impl) returnType:kotlin.String [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data (): kotlin.String declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:.FooInterface2Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data (): kotlin.String declared in .FooInterface2Impl' + CONST String type=kotlin.String value="" + FUN name:data2 visibility:public modality:OPEN <> ($this:.FooInterface2Impl, value:kotlin.Int) returnType:kotlin.String [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data2 (value: kotlin.Int): kotlin.String declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:.FooInterface2Impl + VALUE_PARAMETER name:value index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2 (value: kotlin.Int): kotlin.String declared in .FooInterface2Impl' + CONST String type=kotlin.String value="" + FUN name:data3 visibility:public modality:OPEN <> ($this:.FooInterface2Impl, $receiver:kotlin.Int) returnType:kotlin.String [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data3 (): kotlin.String declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:.FooInterface2Impl + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3 (): kotlin.String declared in .FooInterface2Impl' + CONST String type=kotlin.String value="" + CLASS CLASS name:FooInterface3Impl modality:FINAL visibility:public superTypes:[.FooInterface3] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface3Impl + CONSTRUCTOR visibility:public <> () returnType:.FooInterface3Impl [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:FooInterface3Impl modality:FINAL visibility:public superTypes:[.FooInterface3]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:data visibility:public modality:OPEN <> ($this:.FooInterface3Impl) returnType:kotlin.String [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = true) + JvmSynthetic + overridden: + public abstract fun data (): kotlin.String declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:.FooInterface3Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data (): kotlin.String declared in .FooInterface3Impl' + CONST String type=kotlin.String value="" + PROPERTY GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN [val] + annotations: + Api4J + overridden: + public open dataBlocking: kotlin.String declared in .FooInterface3 + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name: visibility:public modality:OPEN <> ($this:.FooInterface3Impl) returnType:kotlin.String + annotations: + Api4J + correspondingProperty: PROPERTY GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN [val] + overridden: + public open fun (): kotlin.String declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:.FooInterface3Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.String declared in .FooInterface3Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .FooInterface3Impl.' + CALL 'public open fun data (): kotlin.String declared in .FooInterface3Impl' type=kotlin.String origin=null + $this: GET_VAR ': .FooInterface3Impl declared in .FooInterface3Impl.' type=.FooInterface3Impl origin=null + CLASS CLASS name:FooInterface4Impl modality:FINAL visibility:public superTypes:[.FooInterface4] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface4Impl + CONSTRUCTOR visibility:public <> () returnType:.FooInterface4Impl [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:FooInterface4Impl modality:FINAL visibility:public superTypes:[.FooInterface4]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data2Blocking visibility:public modality:OPEN <> ($this:.FooInterface4Impl, value:kotlin.Int) returnType:kotlin.String + annotations: + Api4J + overridden: + public open fun data2Blocking (value: kotlin.Int): kotlin.String declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:.FooInterface4Impl + VALUE_PARAMETER name:value index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2Blocking (value: kotlin.Int): kotlin.String declared in .FooInterface4Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .FooInterface4Impl.data2Blocking' + CALL 'public open fun data2 (value: kotlin.Int): kotlin.String declared in .FooInterface4Impl' type=kotlin.String origin=null + $this: GET_VAR ': .FooInterface4Impl declared in .FooInterface4Impl.data2Blocking' type=.FooInterface4Impl origin=null + value: GET_VAR 'value: kotlin.Int declared in .FooInterface4Impl.data2Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN <> ($this:.FooInterface4Impl) returnType:kotlin.String + annotations: + Api4J + overridden: + public open fun dataBlocking (): kotlin.String declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:.FooInterface4Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun dataBlocking (): kotlin.String declared in .FooInterface4Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .FooInterface4Impl.dataBlocking' + CALL 'public open fun data (): kotlin.String declared in .FooInterface4Impl' type=kotlin.String origin=null + $this: GET_VAR ': .FooInterface4Impl declared in .FooInterface4Impl.dataBlocking' type=.FooInterface4Impl origin=null + FUN name:data visibility:public modality:OPEN <> ($this:.FooInterface4Impl) returnType:kotlin.String [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data (): kotlin.String declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:.FooInterface4Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data (): kotlin.String declared in .FooInterface4Impl' + CONST String type=kotlin.String value="" + FUN name:data2 visibility:public modality:OPEN <> ($this:.FooInterface4Impl, value:kotlin.Int) returnType:kotlin.String [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data2 (value: kotlin.Int): kotlin.String declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:.FooInterface4Impl + VALUE_PARAMETER name:value index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2 (value: kotlin.Int): kotlin.String declared in .FooInterface4Impl' + CONST String type=kotlin.String value="" + CLASS INTERFACE name:FooInterface1 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface1 + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:data visibility:public modality:ABSTRACT <> ($this:.FooInterface1) returnType:kotlin.String [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface1 + FUN name:data2 visibility:public modality:ABSTRACT <> ($this:.FooInterface1, value:kotlin.Int) returnType:kotlin.String [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface1 + VALUE_PARAMETER name:value index:0 type:kotlin.Int + FUN name:data3 visibility:public modality:ABSTRACT <> ($this:.FooInterface1, $receiver:kotlin.Int) returnType:kotlin.String [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface1 + $receiver: VALUE_PARAMETER name: type:kotlin.Int + CLASS INTERFACE name:FooInterface2 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface2 + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:data visibility:public modality:ABSTRACT <> ($this:.FooInterface2) returnType:kotlin.String [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface2 + FUN name:data2 visibility:public modality:ABSTRACT <> ($this:.FooInterface2, value:kotlin.Int) returnType:kotlin.String [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface2 + VALUE_PARAMETER name:value index:0 type:kotlin.Int + FUN name:data2Blocking visibility:public modality:OPEN <> ($this:.FooInterface2, value:kotlin.Int) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:.FooInterface2 + VALUE_PARAMETER name:value index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2Blocking (value: kotlin.Int): kotlin.String declared in .FooInterface2' + CONST String type=kotlin.String value="" + FUN name:data3 visibility:public modality:ABSTRACT <> ($this:.FooInterface2, $receiver:kotlin.Int) returnType:kotlin.String [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface2 + $receiver: VALUE_PARAMETER name: type:kotlin.Int + FUN name:data3Blocking visibility:public modality:OPEN <> ($this:.FooInterface2, $receiver:kotlin.Int) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:.FooInterface2 + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3Blocking (): kotlin.String declared in .FooInterface2' + CONST String type=kotlin.String value="" + FUN name:dataBlocking visibility:public modality:OPEN <> ($this:.FooInterface2) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:.FooInterface2 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun dataBlocking (): kotlin.String declared in .FooInterface2' + CONST String type=kotlin.String value="" + CLASS INTERFACE name:FooInterface3 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface3 + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:data visibility:public modality:ABSTRACT <> ($this:.FooInterface3) returnType:kotlin.String [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface3 + PROPERTY name:dataBlocking visibility:public modality:OPEN [val] + FUN name: visibility:public modality:OPEN <> ($this:.FooInterface3) returnType:kotlin.String + correspondingProperty: PROPERTY name:dataBlocking visibility:public modality:OPEN [val] + $this: VALUE_PARAMETER name: type:.FooInterface3 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.String declared in .FooInterface3' + CONST String type=kotlin.String value="" + CLASS INTERFACE name:FooInterface4 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface4 + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data2Blocking visibility:public modality:OPEN <> ($this:.FooInterface4, value:kotlin.Int) returnType:kotlin.String + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface4 + VALUE_PARAMETER name:value index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2Blocking (value: kotlin.Int): kotlin.String declared in .FooInterface4' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .FooInterface4.data2Blocking' + CALL 'public abstract fun data2 (value: kotlin.Int): kotlin.String declared in .FooInterface4' type=kotlin.String origin=null + $this: GET_VAR ': .FooInterface4 declared in .FooInterface4.data2Blocking' type=.FooInterface4 origin=null + value: GET_VAR 'value: kotlin.Int declared in .FooInterface4.data2Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN <> ($this:.FooInterface4) returnType:kotlin.String + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface4 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun dataBlocking (): kotlin.String declared in .FooInterface4' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .FooInterface4.dataBlocking' + CALL 'public abstract fun data (): kotlin.String declared in .FooInterface4' type=kotlin.String origin=null + $this: GET_VAR ': .FooInterface4 declared in .FooInterface4.dataBlocking' type=.FooInterface4 origin=null + FUN name:data visibility:public modality:ABSTRACT <> ($this:.FooInterface4) returnType:kotlin.String [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + $this: VALUE_PARAMETER name: type:.FooInterface4 + FUN name:data2 visibility:public modality:ABSTRACT <> ($this:.FooInterface4, value:kotlin.Int) returnType:kotlin.String [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + $this: VALUE_PARAMETER name: type:.FooInterface4 + VALUE_PARAMETER name:value index:0 type:kotlin.Int diff --git a/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.fir.txt b/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.fir.txt new file mode 100644 index 0000000..7958223 --- /dev/null +++ b/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.fir.txt @@ -0,0 +1,127 @@ +FILE: Main.kt + public abstract interface FooInterface1 : R|kotlin/Any| { + public abstract suspend fun data(): R|kotlin/String| + + public abstract suspend fun data2(value: R|kotlin/Int|): R|kotlin/String| + + public abstract suspend fun R|kotlin/Int|.data3(): R|kotlin/String| + + } + public final class FooInterface1Impl : R|FooInterface1| { + public constructor(): R|FooInterface1Impl| { + super() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data(): R|kotlin/String| { + ^data String() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data2(value: R|kotlin/Int|): R|kotlin/String| { + ^data2 String() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun R|kotlin/Int|.data3(): R|kotlin/String| { + ^data3 String() + } + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun data2Blocking(value: R|kotlin/Int|): R|kotlin/String| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun dataBlocking(): R|kotlin/String| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun R|kotlin/Int|.data3Blocking(): R|kotlin/String| + + } + public abstract interface FooInterface2 : R|kotlin/Any| { + public abstract suspend fun data(): R|kotlin/String| + + public open fun dataBlocking(): R|kotlin/String| { + ^dataBlocking String() + } + + public abstract suspend fun data2(value: R|kotlin/Int|): R|kotlin/String| + + public open fun data2Blocking(value: R|kotlin/Int|): R|kotlin/String| { + ^data2Blocking String() + } + + public abstract suspend fun R|kotlin/Int|.data3(): R|kotlin/String| + + public open fun R|kotlin/Int|.data3Blocking(): R|kotlin/String| { + ^data3Blocking String() + } + + } + public final class FooInterface2Impl : R|FooInterface2| { + public constructor(): R|FooInterface2Impl| { + super() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data(): R|kotlin/String| { + ^data String() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data2(value: R|kotlin/Int|): R|kotlin/String| { + ^data2 String() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun R|kotlin/Int|.data3(): R|kotlin/String| { + ^data3 String() + } + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open override fun data2Blocking(value: R|kotlin/Int|): R|kotlin/String| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open override fun dataBlocking(): R|kotlin/String| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open override fun R|kotlin/Int|.data3Blocking(): R|kotlin/String| + + } + public abstract interface FooInterface3 : R|kotlin/Any| { + public abstract suspend fun data(): R|kotlin/String| + + public open val dataBlocking: R|kotlin/String| + public get(): R|kotlin/String| { + ^ String() + } + + } + public final class FooInterface3Impl : R|FooInterface3| { + public constructor(): R|FooInterface3Impl| { + super() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|(asProperty = Boolean(true)) public open override suspend fun data(): R|kotlin/String| { + ^data String() + } + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open override val dataBlocking: R|kotlin/String| + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public get(): R|kotlin/String| + + } + public abstract interface FooInterface4 : R|kotlin/Any| { + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public abstract suspend fun data(): R|kotlin/String| + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public abstract suspend fun data2(value: R|kotlin/Int|): R|kotlin/String| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun data2Blocking(value: R|kotlin/Int|): R|kotlin/String| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun dataBlocking(): R|kotlin/String| + + } + public final class FooInterface4Impl : R|FooInterface4| { + public constructor(): R|FooInterface4Impl| { + super() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data(): R|kotlin/String| { + ^data String() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data2(value: R|kotlin/Int|): R|kotlin/String| { + ^data2 String() + } + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open override fun data2Blocking(value: R|kotlin/Int|): R|kotlin/String| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open override fun dataBlocking(): R|kotlin/String| + + } diff --git a/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.kt b/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.kt new file mode 100644 index 0000000..5a915d0 --- /dev/null +++ b/compiler/suspend-transform-plugin/src/testData/codegen/implOverriden.kt @@ -0,0 +1,74 @@ +// FIR_DUMP +// DUMP_IR +// SOURCE +// FILE: Main.kt [MainKt#main] + +import love.forte.plugin.suspendtrans.annotation.JvmBlocking +import love.forte.plugin.suspendtrans.annotation.JvmAsync + +interface FooInterface1 { + suspend fun data(): String + suspend fun data2(value: Int): String + suspend fun Int.data3(): String +} + +class FooInterface1Impl : FooInterface1 { + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data(): String = "" + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data2(value: Int): String = "" + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun Int.data3(): String = "" +} + +interface FooInterface2 { + suspend fun data(): String + fun dataBlocking(): String = "" + + suspend fun data2(value: Int): String + fun data2Blocking(value: Int): String = "" + + suspend fun Int.data3(): String + fun Int.data3Blocking(): String = "" +} + +class FooInterface2Impl : FooInterface2 { + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data(): String = "" + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data2(value: Int): String = "" + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun Int.data3(): String = "" +} + + +interface FooInterface3 { + suspend fun data(): String + val dataBlocking: String get() = "" +} + +class FooInterface3Impl : FooInterface3 { + @love.forte.plugin.suspendtrans.annotation.JvmBlocking(asProperty = true) + override suspend fun data(): String = "" +} + +interface FooInterface4 { + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + suspend fun data(): String + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + suspend fun data2(value: Int): String +} + +class FooInterface4Impl : FooInterface4 { + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data(): String = "" + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data2(value: Int): String = "" +} + diff --git a/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.asm.txt b/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.asm.txt new file mode 100644 index 0000000..9ed915d --- /dev/null +++ b/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.asm.txt @@ -0,0 +1,451 @@ +public abstract interface Bar : java/lang/Object, Foo { + +} + +public abstract interface Foo : java/lang/Object { + +} + +public abstract interface FooInterface1 : java/lang/Object { + public abstract java.lang.Object data(kotlin.coroutines.Continuation p0) + + public abstract java.lang.Object data2(java.lang.Object p0, kotlin.coroutines.Continuation p1) + + public abstract java.lang.Object data3(int p0, kotlin.coroutines.Continuation p1) +} + +final class FooInterface1Impl$data2Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final java.lang.Object $value + + int label + + final FooInterface1Impl this$0 + + void (FooInterface1Impl $receiver, java.lang.Object $value, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface1Impl$data3Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $this_data3Blocking + + int label + + final FooInterface1Impl this$0 + + void (FooInterface1Impl $receiver, int $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface1Impl$dataBlocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + int label + + final FooInterface1Impl this$0 + + void (FooInterface1Impl $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +public final class FooInterface1Impl : java/lang/Object, FooInterface1 { + public void () + + public java.lang.Object data(kotlin.coroutines.Continuation $completion) + + public java.lang.Object data2(java.lang.Object value, kotlin.coroutines.Continuation $completion) + + public Bar data2Blocking(java.lang.Object value) + + public java.lang.Object data3(int $this$data3, kotlin.coroutines.Continuation $completion) + + public Bar data3Blocking(int $this$data3Blocking) + + public Bar dataBlocking() +} + +public abstract interface FooInterface2 : java/lang/Object { + public abstract java.lang.Object data(kotlin.coroutines.Continuation p0) + + public abstract java.lang.Object data2(Foo p0, kotlin.coroutines.Continuation p1) + + public abstract java.lang.Object data3(int p0, kotlin.coroutines.Continuation p1) +} + +final class FooInterface2Impl$data2Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final Foo $value + + int label + + final FooInterface2Impl this$0 + + void (FooInterface2Impl $receiver, Foo $value, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface2Impl$data3Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $this_data3Blocking + + int label + + final FooInterface2Impl this$0 + + void (FooInterface2Impl $receiver, int $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface2Impl$dataBlocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + int label + + final FooInterface2Impl this$0 + + void (FooInterface2Impl $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +public final class FooInterface2Impl : java/lang/Object, FooInterface2 { + public void () + + public java.lang.Object data(kotlin.coroutines.Continuation $completion) + + public java.lang.Object data2(Foo value, kotlin.coroutines.Continuation $completion) + + public Foo data2Blocking(Foo value) + + public java.lang.Object data3(int $this$data3, kotlin.coroutines.Continuation $completion) + + public Foo data3Blocking(int $this$data3Blocking) + + public Foo dataBlocking() +} + +public final class FooInterface3$DefaultImpls : java/lang/Object { + public static Foo data2Blocking(FooInterface3 $this, java.lang.Object value) + + public static Foo data3Blocking(FooInterface3 $this, int $receiver) + + public static Foo dataBlocking(FooInterface3 $this) +} + +final class FooInterface3$data2Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final java.lang.Object $value + + int label + + final FooInterface3 this$0 + + void (FooInterface3 $receiver, java.lang.Object $value, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface3$data3Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $this_data3Blocking + + int label + + final FooInterface3 this$0 + + void (FooInterface3 $receiver, int $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface3$dataBlocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + int label + + final FooInterface3 this$0 + + void (FooInterface3 $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +public abstract interface FooInterface3 : java/lang/Object { + public abstract java.lang.Object data(kotlin.coroutines.Continuation p0) + + public abstract java.lang.Object data2(java.lang.Object p0, kotlin.coroutines.Continuation p1) + + public abstract Foo data2Blocking(java.lang.Object p0) + + public abstract java.lang.Object data3(int p0, kotlin.coroutines.Continuation p1) + + public abstract Foo data3Blocking(int p0) + + public abstract Foo dataBlocking() +} + +final class FooInterface3Impl$data2Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final java.lang.Object $value + + int label + + final FooInterface3Impl this$0 + + void (FooInterface3Impl $receiver, java.lang.Object $value, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface3Impl$data3Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $this_data3Blocking + + int label + + final FooInterface3Impl this$0 + + void (FooInterface3Impl $receiver, int $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface3Impl$dataBlocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + int label + + final FooInterface3Impl this$0 + + void (FooInterface3Impl $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +public final class FooInterface3Impl : java/lang/Object, FooInterface3 { + public void () + + public java.lang.Object data(kotlin.coroutines.Continuation $completion) + + public java.lang.Object data2(java.lang.Object value, kotlin.coroutines.Continuation $completion) + + public Bar data2Blocking(java.lang.Object value) + + public Bar data2Blocking(java.lang.Object value) + + public Foo data2Blocking(java.lang.Object value) + + public java.lang.Object data3(int $this$data3, kotlin.coroutines.Continuation $completion) + + public Bar data3Blocking(int $this$data3Blocking) + + public Foo data3Blocking(int $this$data3Blocking) + + public Bar dataBlocking() + + public Foo dataBlocking() +} + +public final class FooInterface4$DefaultImpls : java/lang/Object { + public static Foo data2Blocking(FooInterface4 $this, Foo value) + + public static Foo data3Blocking(FooInterface4 $this, int $receiver) + + public static Foo dataBlocking(FooInterface4 $this) +} + +final class FooInterface4$data2Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final Foo $value + + int label + + final FooInterface4 this$0 + + void (FooInterface4 $receiver, Foo $value, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface4$data3Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $this_data3Blocking + + int label + + final FooInterface4 this$0 + + void (FooInterface4 $receiver, int $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface4$dataBlocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + int label + + final FooInterface4 this$0 + + void (FooInterface4 $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +public abstract interface FooInterface4 : java/lang/Object { + public abstract java.lang.Object data(kotlin.coroutines.Continuation p0) + + public abstract java.lang.Object data2(Foo p0, kotlin.coroutines.Continuation p1) + + public abstract Foo data2Blocking(Foo p0) + + public abstract java.lang.Object data3(int p0, kotlin.coroutines.Continuation p1) + + public abstract Foo data3Blocking(int p0) + + public abstract Foo dataBlocking() +} + +final class FooInterface4Impl$data2Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final Foo $value + + int label + + final FooInterface4Impl this$0 + + void (FooInterface4Impl $receiver, Foo $value, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface4Impl$data3Blocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + final int $this_data3Blocking + + int label + + final FooInterface4Impl this$0 + + void (FooInterface4Impl $receiver, int $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +final class FooInterface4Impl$dataBlocking$1 : kotlin/coroutines/jvm/internal/SuspendLambda, kotlin/jvm/functions/Function1 { + int label + + final FooInterface4Impl this$0 + + void (FooInterface4Impl $receiver, kotlin.coroutines.Continuation $completion) + + public final kotlin.coroutines.Continuation create(kotlin.coroutines.Continuation $completion) + + public final java.lang.Object invoke(kotlin.coroutines.Continuation p1) + + public java.lang.Object invoke(java.lang.Object p1) + + public final java.lang.Object invokeSuspend(java.lang.Object $result) +} + +public final class FooInterface4Impl : java/lang/Object, FooInterface4 { + public void () + + public java.lang.Object data(kotlin.coroutines.Continuation $completion) + + public java.lang.Object data2(Foo value, kotlin.coroutines.Continuation $completion) + + public Foo data2Blocking(Foo value) + + public java.lang.Object data3(int $this$data3, kotlin.coroutines.Continuation $completion) + + public Foo data3Blocking(int $this$data3Blocking) + + public Foo dataBlocking() +} diff --git a/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.fir.ir.txt b/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.fir.ir.txt new file mode 100644 index 0000000..bd101fd --- /dev/null +++ b/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.fir.ir.txt @@ -0,0 +1,657 @@ +FILE fqName: fileName:/Main.kt + CLASS CLASS name:FooInterface1Impl modality:FINAL visibility:public superTypes:[.FooInterface1.FooInterface1Impl>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface1Impl.FooInterface1Impl> + TYPE_PARAMETER name:T index:0 variance: superTypes:[.Bar] reified:false + CONSTRUCTOR visibility:public <> () returnType:.FooInterface1Impl.FooInterface1Impl> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:FooInterface1Impl modality:FINAL visibility:public superTypes:[.FooInterface1.FooInterface1Impl>]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .FooInterface1 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .FooInterface1 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .FooInterface1 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data2Blocking visibility:public modality:OPEN ($this:.FooInterface1Impl.FooInterface1Impl>, value:A of .FooInterface1Impl.data2) returnType:T of .FooInterface1Impl + annotations: + Api4J + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:.FooInterface1Impl.FooInterface1Impl> + VALUE_PARAMETER name:value index:0 type:A of .FooInterface1Impl.data2 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2Blocking (value: A of .FooInterface1Impl.data2): T of .FooInterface1Impl declared in .FooInterface1Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface1Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface1Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface1Impl declared in .FooInterface1Impl.data2Blocking' + CALL 'public open fun data2 (value: A of .FooInterface1Impl.data2): T of .FooInterface1Impl declared in .FooInterface1Impl' type=T of .FooInterface1Impl origin=null + : + $this: GET_VAR ': .FooInterface1Impl.FooInterface1Impl> declared in .FooInterface1Impl.data2Blocking' type=.FooInterface1Impl.FooInterface1Impl> origin=null + value: GET_VAR 'value: A of .FooInterface1Impl.data2 declared in .FooInterface1Impl.data2Blocking' type=A of .FooInterface1Impl.data2 origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data3Blocking visibility:public modality:OPEN <> ($this:.FooInterface1Impl.FooInterface1Impl>, $receiver:kotlin.Int) returnType:T of .FooInterface1Impl + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface1Impl.FooInterface1Impl> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3Blocking (): T of .FooInterface1Impl declared in .FooInterface1Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface1Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface1Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface1Impl declared in .FooInterface1Impl.data3Blocking' + CALL 'public open fun data3 (): T of .FooInterface1Impl declared in .FooInterface1Impl' type=T of .FooInterface1Impl origin=null + $this: GET_VAR ': .FooInterface1Impl.FooInterface1Impl> declared in .FooInterface1Impl.data3Blocking' type=.FooInterface1Impl.FooInterface1Impl> origin=null + $receiver: GET_VAR ': kotlin.Int declared in .FooInterface1Impl.data3Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN <> ($this:.FooInterface1Impl.FooInterface1Impl>) returnType:T of .FooInterface1Impl + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface1Impl.FooInterface1Impl> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun dataBlocking (): T of .FooInterface1Impl declared in .FooInterface1Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface1Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface1Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface1Impl declared in .FooInterface1Impl.dataBlocking' + CALL 'public open fun data (): T of .FooInterface1Impl declared in .FooInterface1Impl' type=T of .FooInterface1Impl origin=null + $this: GET_VAR ': .FooInterface1Impl.FooInterface1Impl> declared in .FooInterface1Impl.dataBlocking' type=.FooInterface1Impl.FooInterface1Impl> origin=null + FUN name:data visibility:public modality:OPEN <> ($this:.FooInterface1Impl.FooInterface1Impl>) returnType:T of .FooInterface1Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data (): T of .FooInterface1 declared in .FooInterface1 + $this: VALUE_PARAMETER name: type:.FooInterface1Impl.FooInterface1Impl> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data (): T of .FooInterface1Impl declared in .FooInterface1Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + FUN name:data2 visibility:public modality:OPEN ($this:.FooInterface1Impl.FooInterface1Impl>, value:A of .FooInterface1Impl.data2) returnType:T of .FooInterface1Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data2 (value: A of .FooInterface1.data2): T of .FooInterface1 declared in .FooInterface1 + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:.FooInterface1Impl.FooInterface1Impl> + VALUE_PARAMETER name:value index:0 type:A of .FooInterface1Impl.data2 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2 (value: A of .FooInterface1Impl.data2): T of .FooInterface1Impl declared in .FooInterface1Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + FUN name:data3 visibility:public modality:OPEN <> ($this:.FooInterface1Impl.FooInterface1Impl>, $receiver:kotlin.Int) returnType:T of .FooInterface1Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data3 (): T of .FooInterface1 declared in .FooInterface1 + $this: VALUE_PARAMETER name: type:.FooInterface1Impl.FooInterface1Impl> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3 (): T of .FooInterface1Impl declared in .FooInterface1Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + CLASS CLASS name:FooInterface2Impl modality:FINAL visibility:public superTypes:[.FooInterface2.FooInterface2Impl>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface2Impl.FooInterface2Impl> + TYPE_PARAMETER name:T index:0 variance: superTypes:[.Foo] reified:false + CONSTRUCTOR visibility:public <> () returnType:.FooInterface2Impl.FooInterface2Impl> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:FooInterface2Impl modality:FINAL visibility:public superTypes:[.FooInterface2.FooInterface2Impl>]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data2Blocking visibility:public modality:OPEN <> ($this:.FooInterface2Impl.FooInterface2Impl>, value:T of .FooInterface2Impl) returnType:T of .FooInterface2Impl + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface2Impl.FooInterface2Impl> + VALUE_PARAMETER name:value index:0 type:T of .FooInterface2Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2Blocking (value: T of .FooInterface2Impl): T of .FooInterface2Impl declared in .FooInterface2Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface2Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface2Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface2Impl declared in .FooInterface2Impl.data2Blocking' + CALL 'public open fun data2 (value: T of .FooInterface2Impl): T of .FooInterface2Impl declared in .FooInterface2Impl' type=T of .FooInterface2Impl origin=null + $this: GET_VAR ': .FooInterface2Impl.FooInterface2Impl> declared in .FooInterface2Impl.data2Blocking' type=.FooInterface2Impl.FooInterface2Impl> origin=null + value: GET_VAR 'value: T of .FooInterface2Impl declared in .FooInterface2Impl.data2Blocking' type=T of .FooInterface2Impl origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data3Blocking visibility:public modality:OPEN <> ($this:.FooInterface2Impl.FooInterface2Impl>, $receiver:kotlin.Int) returnType:T of .FooInterface2Impl + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface2Impl.FooInterface2Impl> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3Blocking (): T of .FooInterface2Impl declared in .FooInterface2Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface2Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface2Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface2Impl declared in .FooInterface2Impl.data3Blocking' + CALL 'public open fun data3 (): T of .FooInterface2Impl declared in .FooInterface2Impl' type=T of .FooInterface2Impl origin=null + $this: GET_VAR ': .FooInterface2Impl.FooInterface2Impl> declared in .FooInterface2Impl.data3Blocking' type=.FooInterface2Impl.FooInterface2Impl> origin=null + $receiver: GET_VAR ': kotlin.Int declared in .FooInterface2Impl.data3Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN <> ($this:.FooInterface2Impl.FooInterface2Impl>) returnType:T of .FooInterface2Impl + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface2Impl.FooInterface2Impl> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun dataBlocking (): T of .FooInterface2Impl declared in .FooInterface2Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface2Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface2Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface2Impl declared in .FooInterface2Impl.dataBlocking' + CALL 'public open fun data (): T of .FooInterface2Impl declared in .FooInterface2Impl' type=T of .FooInterface2Impl origin=null + $this: GET_VAR ': .FooInterface2Impl.FooInterface2Impl> declared in .FooInterface2Impl.dataBlocking' type=.FooInterface2Impl.FooInterface2Impl> origin=null + FUN name:data visibility:public modality:OPEN <> ($this:.FooInterface2Impl.FooInterface2Impl>) returnType:T of .FooInterface2Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data (): T of .FooInterface2 declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:.FooInterface2Impl.FooInterface2Impl> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data (): T of .FooInterface2Impl declared in .FooInterface2Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + FUN name:data2 visibility:public modality:OPEN <> ($this:.FooInterface2Impl.FooInterface2Impl>, value:T of .FooInterface2Impl) returnType:T of .FooInterface2Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data2 (value: T of .FooInterface2): T of .FooInterface2 declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:.FooInterface2Impl.FooInterface2Impl> + VALUE_PARAMETER name:value index:0 type:T of .FooInterface2Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2 (value: T of .FooInterface2Impl): T of .FooInterface2Impl declared in .FooInterface2Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + FUN name:data3 visibility:public modality:OPEN <> ($this:.FooInterface2Impl.FooInterface2Impl>, $receiver:kotlin.Int) returnType:T of .FooInterface2Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data3 (): T of .FooInterface2 declared in .FooInterface2 + $this: VALUE_PARAMETER name: type:.FooInterface2Impl.FooInterface2Impl> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3 (): T of .FooInterface2Impl declared in .FooInterface2Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + CLASS CLASS name:FooInterface3Impl modality:FINAL visibility:public superTypes:[.FooInterface3.FooInterface3Impl>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface3Impl.FooInterface3Impl> + TYPE_PARAMETER name:T index:0 variance: superTypes:[.Bar] reified:false + CONSTRUCTOR visibility:public <> () returnType:.FooInterface3Impl.FooInterface3Impl> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:FooInterface3Impl modality:FINAL visibility:public superTypes:[.FooInterface3.FooInterface3Impl>]' + FUN FAKE_OVERRIDE name:data2Blocking visibility:public modality:OPEN ($this:.FooInterface3.FooInterface3Impl>, value:A of .FooInterface3.data2) returnType:T of .FooInterface3Impl [fake_override] + annotations: + Api4J + overridden: + public open fun data2Blocking (value: A of .FooInterface3.data2): T of .FooInterface3 declared in .FooInterface3 + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:.FooInterface3.FooInterface3Impl> + VALUE_PARAMETER name:value index:0 type:A of .FooInterface3.data2 + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data2Blocking visibility:public modality:OPEN ($this:.FooInterface3Impl.FooInterface3Impl>, value:A of .FooInterface3Impl.data2) returnType:T of .FooInterface3Impl + annotations: + Api4J + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:.FooInterface3Impl.FooInterface3Impl> + VALUE_PARAMETER name:value index:0 type:A of .FooInterface3Impl.data2 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2Blocking (value: A of .FooInterface3Impl.data2): T of .FooInterface3Impl declared in .FooInterface3Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface3Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface3Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface3Impl declared in .FooInterface3Impl.data2Blocking' + CALL 'public open fun data2 (value: A of .FooInterface3Impl.data2): T of .FooInterface3Impl declared in .FooInterface3Impl' type=T of .FooInterface3Impl origin=null + : + $this: GET_VAR ': .FooInterface3Impl.FooInterface3Impl> declared in .FooInterface3Impl.data2Blocking' type=.FooInterface3Impl.FooInterface3Impl> origin=null + value: GET_VAR 'value: A of .FooInterface3Impl.data2 declared in .FooInterface3Impl.data2Blocking' type=A of .FooInterface3Impl.data2 origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data3Blocking visibility:public modality:OPEN <> ($this:.FooInterface3Impl.FooInterface3Impl>, $receiver:kotlin.Int) returnType:T of .FooInterface3Impl + annotations: + Api4J + overridden: + public open fun data3Blocking (): T of .FooInterface3 declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:.FooInterface3Impl.FooInterface3Impl> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3Blocking (): T of .FooInterface3Impl declared in .FooInterface3Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface3Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface3Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface3Impl declared in .FooInterface3Impl.data3Blocking' + CALL 'public open fun data3 (): T of .FooInterface3Impl declared in .FooInterface3Impl' type=T of .FooInterface3Impl origin=null + $this: GET_VAR ': .FooInterface3Impl.FooInterface3Impl> declared in .FooInterface3Impl.data3Blocking' type=.FooInterface3Impl.FooInterface3Impl> origin=null + $receiver: GET_VAR ': kotlin.Int declared in .FooInterface3Impl.data3Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN <> ($this:.FooInterface3Impl.FooInterface3Impl>) returnType:T of .FooInterface3Impl + annotations: + Api4J + overridden: + public open fun dataBlocking (): T of .FooInterface3 declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:.FooInterface3Impl.FooInterface3Impl> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun dataBlocking (): T of .FooInterface3Impl declared in .FooInterface3Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface3Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface3Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface3Impl declared in .FooInterface3Impl.dataBlocking' + CALL 'public open fun data (): T of .FooInterface3Impl declared in .FooInterface3Impl' type=T of .FooInterface3Impl origin=null + $this: GET_VAR ': .FooInterface3Impl.FooInterface3Impl> declared in .FooInterface3Impl.dataBlocking' type=.FooInterface3Impl.FooInterface3Impl> origin=null + FUN name:data visibility:public modality:OPEN <> ($this:.FooInterface3Impl.FooInterface3Impl>) returnType:T of .FooInterface3Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data (): T of .FooInterface3 declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:.FooInterface3Impl.FooInterface3Impl> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data (): T of .FooInterface3Impl declared in .FooInterface3Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + FUN name:data2 visibility:public modality:OPEN ($this:.FooInterface3Impl.FooInterface3Impl>, value:A of .FooInterface3Impl.data2) returnType:T of .FooInterface3Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data2 (value: A of .FooInterface3.data2): T of .FooInterface3 declared in .FooInterface3 + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:.FooInterface3Impl.FooInterface3Impl> + VALUE_PARAMETER name:value index:0 type:A of .FooInterface3Impl.data2 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2 (value: A of .FooInterface3Impl.data2): T of .FooInterface3Impl declared in .FooInterface3Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + FUN name:data3 visibility:public modality:OPEN <> ($this:.FooInterface3Impl.FooInterface3Impl>, $receiver:kotlin.Int) returnType:T of .FooInterface3Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data3 (): T of .FooInterface3 declared in .FooInterface3 + $this: VALUE_PARAMETER name: type:.FooInterface3Impl.FooInterface3Impl> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3 (): T of .FooInterface3Impl declared in .FooInterface3Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + CLASS CLASS name:FooInterface4Impl modality:FINAL visibility:public superTypes:[.FooInterface4.FooInterface4Impl>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface4Impl.FooInterface4Impl> + TYPE_PARAMETER name:T index:0 variance: superTypes:[.Foo] reified:false + CONSTRUCTOR visibility:public <> () returnType:.FooInterface4Impl.FooInterface4Impl> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:FooInterface4Impl modality:FINAL visibility:public superTypes:[.FooInterface4.FooInterface4Impl>]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data2Blocking visibility:public modality:OPEN <> ($this:.FooInterface4Impl.FooInterface4Impl>, value:T of .FooInterface4Impl) returnType:T of .FooInterface4Impl + annotations: + Api4J + overridden: + public open fun data2Blocking (value: T of .FooInterface4): T of .FooInterface4 declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:.FooInterface4Impl.FooInterface4Impl> + VALUE_PARAMETER name:value index:0 type:T of .FooInterface4Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2Blocking (value: T of .FooInterface4Impl): T of .FooInterface4Impl declared in .FooInterface4Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface4Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface4Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface4Impl declared in .FooInterface4Impl.data2Blocking' + CALL 'public open fun data2 (value: T of .FooInterface4Impl): T of .FooInterface4Impl declared in .FooInterface4Impl' type=T of .FooInterface4Impl origin=null + $this: GET_VAR ': .FooInterface4Impl.FooInterface4Impl> declared in .FooInterface4Impl.data2Blocking' type=.FooInterface4Impl.FooInterface4Impl> origin=null + value: GET_VAR 'value: T of .FooInterface4Impl declared in .FooInterface4Impl.data2Blocking' type=T of .FooInterface4Impl origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data3Blocking visibility:public modality:OPEN <> ($this:.FooInterface4Impl.FooInterface4Impl>, $receiver:kotlin.Int) returnType:T of .FooInterface4Impl + annotations: + Api4J + overridden: + public open fun data3Blocking (): T of .FooInterface4 declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:.FooInterface4Impl.FooInterface4Impl> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3Blocking (): T of .FooInterface4Impl declared in .FooInterface4Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface4Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface4Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface4Impl declared in .FooInterface4Impl.data3Blocking' + CALL 'public open fun data3 (): T of .FooInterface4Impl declared in .FooInterface4Impl' type=T of .FooInterface4Impl origin=null + $this: GET_VAR ': .FooInterface4Impl.FooInterface4Impl> declared in .FooInterface4Impl.data3Blocking' type=.FooInterface4Impl.FooInterface4Impl> origin=null + $receiver: GET_VAR ': kotlin.Int declared in .FooInterface4Impl.data3Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN <> ($this:.FooInterface4Impl.FooInterface4Impl>) returnType:T of .FooInterface4Impl + annotations: + Api4J + overridden: + public open fun dataBlocking (): T of .FooInterface4 declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:.FooInterface4Impl.FooInterface4Impl> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun dataBlocking (): T of .FooInterface4Impl declared in .FooInterface4Impl' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface4Impl> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface4Impl [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface4Impl declared in .FooInterface4Impl.dataBlocking' + CALL 'public open fun data (): T of .FooInterface4Impl declared in .FooInterface4Impl' type=T of .FooInterface4Impl origin=null + $this: GET_VAR ': .FooInterface4Impl.FooInterface4Impl> declared in .FooInterface4Impl.dataBlocking' type=.FooInterface4Impl.FooInterface4Impl> origin=null + FUN name:data visibility:public modality:OPEN <> ($this:.FooInterface4Impl.FooInterface4Impl>) returnType:T of .FooInterface4Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data (): T of .FooInterface4 declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:.FooInterface4Impl.FooInterface4Impl> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data (): T of .FooInterface4Impl declared in .FooInterface4Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + FUN name:data2 visibility:public modality:OPEN <> ($this:.FooInterface4Impl.FooInterface4Impl>, value:T of .FooInterface4Impl) returnType:T of .FooInterface4Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data2 (value: T of .FooInterface4): T of .FooInterface4 declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:.FooInterface4Impl.FooInterface4Impl> + VALUE_PARAMETER name:value index:0 type:T of .FooInterface4Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2 (value: T of .FooInterface4Impl): T of .FooInterface4Impl declared in .FooInterface4Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + FUN name:data3 visibility:public modality:OPEN <> ($this:.FooInterface4Impl.FooInterface4Impl>, $receiver:kotlin.Int) returnType:T of .FooInterface4Impl [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + overridden: + public abstract fun data3 (): T of .FooInterface4 declared in .FooInterface4 + $this: VALUE_PARAMETER name: type:.FooInterface4Impl.FooInterface4Impl> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3 (): T of .FooInterface4Impl declared in .FooInterface4Impl' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + CLASS INTERFACE name:Bar modality:ABSTRACT visibility:public superTypes:[.Foo] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Bar + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Foo + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .Foo + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .Foo + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS INTERFACE name:Foo modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Foo + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS INTERFACE name:FooInterface1 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface1.FooInterface1> + TYPE_PARAMETER name:T index:0 variance: superTypes:[.Foo] reified:false + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:data visibility:public modality:ABSTRACT <> ($this:.FooInterface1.FooInterface1>) returnType:T of .FooInterface1 [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface1.FooInterface1> + FUN name:data2 visibility:public modality:ABSTRACT ($this:.FooInterface1.FooInterface1>, value:A of .FooInterface1.data2) returnType:T of .FooInterface1 [suspend] + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:.FooInterface1.FooInterface1> + VALUE_PARAMETER name:value index:0 type:A of .FooInterface1.data2 + FUN name:data3 visibility:public modality:ABSTRACT <> ($this:.FooInterface1.FooInterface1>, $receiver:kotlin.Int) returnType:T of .FooInterface1 [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface1.FooInterface1> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + CLASS INTERFACE name:FooInterface2 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface2.FooInterface2> + TYPE_PARAMETER name:T index:0 variance: superTypes:[.Foo] reified:false + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:data visibility:public modality:ABSTRACT <> ($this:.FooInterface2.FooInterface2>) returnType:T of .FooInterface2 [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface2.FooInterface2> + FUN name:data2 visibility:public modality:ABSTRACT <> ($this:.FooInterface2.FooInterface2>, value:T of .FooInterface2) returnType:T of .FooInterface2 [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface2.FooInterface2> + VALUE_PARAMETER name:value index:0 type:T of .FooInterface2 + FUN name:data3 visibility:public modality:ABSTRACT <> ($this:.FooInterface2.FooInterface2>, $receiver:kotlin.Int) returnType:T of .FooInterface2 [suspend] + $this: VALUE_PARAMETER name: type:.FooInterface2.FooInterface2> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + CLASS INTERFACE name:FooInterface3 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface3.FooInterface3> + TYPE_PARAMETER name:T index:0 variance: superTypes:[.Foo] reified:false + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data2Blocking visibility:public modality:OPEN ($this:.FooInterface3.FooInterface3>, value:A of .FooInterface3.data2) returnType:T of .FooInterface3 + annotations: + Api4J + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:.FooInterface3.FooInterface3> + VALUE_PARAMETER name:value index:0 type:A of .FooInterface3.data2 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2Blocking (value: A of .FooInterface3.data2): T of .FooInterface3 declared in .FooInterface3' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface3> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface3 [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface3 declared in .FooInterface3.data2Blocking' + CALL 'public abstract fun data2 (value: A of .FooInterface3.data2): T of .FooInterface3 declared in .FooInterface3' type=T of .FooInterface3 origin=null + : + $this: GET_VAR ': .FooInterface3.FooInterface3> declared in .FooInterface3.data2Blocking' type=.FooInterface3.FooInterface3> origin=null + value: GET_VAR 'value: A of .FooInterface3.data2 declared in .FooInterface3.data2Blocking' type=A of .FooInterface3.data2 origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data3Blocking visibility:public modality:OPEN <> ($this:.FooInterface3.FooInterface3>, $receiver:kotlin.Int) returnType:T of .FooInterface3 + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface3.FooInterface3> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3Blocking (): T of .FooInterface3 declared in .FooInterface3' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface3> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface3 [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface3 declared in .FooInterface3.data3Blocking' + CALL 'public abstract fun data3 (): T of .FooInterface3 declared in .FooInterface3' type=T of .FooInterface3 origin=null + $this: GET_VAR ': .FooInterface3.FooInterface3> declared in .FooInterface3.data3Blocking' type=.FooInterface3.FooInterface3> origin=null + $receiver: GET_VAR ': kotlin.Int declared in .FooInterface3.data3Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN <> ($this:.FooInterface3.FooInterface3>) returnType:T of .FooInterface3 + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface3.FooInterface3> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun dataBlocking (): T of .FooInterface3 declared in .FooInterface3' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface3> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface3 [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface3 declared in .FooInterface3.dataBlocking' + CALL 'public abstract fun data (): T of .FooInterface3 declared in .FooInterface3' type=T of .FooInterface3 origin=null + $this: GET_VAR ': .FooInterface3.FooInterface3> declared in .FooInterface3.dataBlocking' type=.FooInterface3.FooInterface3> origin=null + FUN name:data visibility:public modality:ABSTRACT <> ($this:.FooInterface3.FooInterface3>) returnType:T of .FooInterface3 [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + $this: VALUE_PARAMETER name: type:.FooInterface3.FooInterface3> + FUN name:data2 visibility:public modality:ABSTRACT ($this:.FooInterface3.FooInterface3>, value:A of .FooInterface3.data2) returnType:T of .FooInterface3 [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:.FooInterface3.FooInterface3> + VALUE_PARAMETER name:value index:0 type:A of .FooInterface3.data2 + FUN name:data3 visibility:public modality:ABSTRACT <> ($this:.FooInterface3.FooInterface3>, $receiver:kotlin.Int) returnType:T of .FooInterface3 [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + $this: VALUE_PARAMETER name: type:.FooInterface3.FooInterface3> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + CLASS INTERFACE name:FooInterface4 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.FooInterface4.FooInterface4> + TYPE_PARAMETER name:T index:0 variance: superTypes:[.Foo] reified:false + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data2Blocking visibility:public modality:OPEN <> ($this:.FooInterface4.FooInterface4>, value:T of .FooInterface4) returnType:T of .FooInterface4 + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface4.FooInterface4> + VALUE_PARAMETER name:value index:0 type:T of .FooInterface4 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data2Blocking (value: T of .FooInterface4): T of .FooInterface4 declared in .FooInterface4' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface4> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface4 [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface4 declared in .FooInterface4.data2Blocking' + CALL 'public abstract fun data2 (value: T of .FooInterface4): T of .FooInterface4 declared in .FooInterface4' type=T of .FooInterface4 origin=null + $this: GET_VAR ': .FooInterface4.FooInterface4> declared in .FooInterface4.data2Blocking' type=.FooInterface4.FooInterface4> origin=null + value: GET_VAR 'value: T of .FooInterface4 declared in .FooInterface4.data2Blocking' type=T of .FooInterface4 origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:data3Blocking visibility:public modality:OPEN <> ($this:.FooInterface4.FooInterface4>, $receiver:kotlin.Int) returnType:T of .FooInterface4 + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface4.FooInterface4> + $receiver: VALUE_PARAMETER name: type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun data3Blocking (): T of .FooInterface4 declared in .FooInterface4' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface4> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface4 [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface4 declared in .FooInterface4.data3Blocking' + CALL 'public abstract fun data3 (): T of .FooInterface4 declared in .FooInterface4' type=T of .FooInterface4 origin=null + $this: GET_VAR ': .FooInterface4.FooInterface4> declared in .FooInterface4.data3Blocking' type=.FooInterface4.FooInterface4> origin=null + $receiver: GET_VAR ': kotlin.Int declared in .FooInterface4.data3Blocking' type=kotlin.Int origin=null + FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:dataBlocking visibility:public modality:OPEN <> ($this:.FooInterface4.FooInterface4>) returnType:T of .FooInterface4 + annotations: + Api4J + $this: VALUE_PARAMETER name: type:.FooInterface4.FooInterface4> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun dataBlocking (): T of .FooInterface4 declared in .FooInterface4' + CALL 'public final fun $runInBlocking$ (block: kotlin.coroutines.SuspendFunction0): T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ declared in love.forte.plugin.suspendtrans.runtime' type=T of love.forte.plugin.suspendtrans.runtime.$runInBlocking$ origin=null + : + block: FUN_EXPR type=kotlin.coroutines.SuspendFunction0.FooInterface4> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of .FooInterface4 [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): T of .FooInterface4 declared in .FooInterface4.dataBlocking' + CALL 'public abstract fun data (): T of .FooInterface4 declared in .FooInterface4' type=T of .FooInterface4 origin=null + $this: GET_VAR ': .FooInterface4.FooInterface4> declared in .FooInterface4.dataBlocking' type=.FooInterface4.FooInterface4> origin=null + FUN name:data visibility:public modality:ABSTRACT <> ($this:.FooInterface4.FooInterface4>) returnType:T of .FooInterface4 [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + $this: VALUE_PARAMETER name: type:.FooInterface4.FooInterface4> + FUN name:data2 visibility:public modality:ABSTRACT <> ($this:.FooInterface4.FooInterface4>, value:T of .FooInterface4) returnType:T of .FooInterface4 [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + $this: VALUE_PARAMETER name: type:.FooInterface4.FooInterface4> + VALUE_PARAMETER name:value index:0 type:T of .FooInterface4 + FUN name:data3 visibility:public modality:ABSTRACT <> ($this:.FooInterface4.FooInterface4>, $receiver:kotlin.Int) returnType:T of .FooInterface4 [suspend] + annotations: + JvmBlocking(baseName = , suffix = , asProperty = ) + JvmSynthetic + $this: VALUE_PARAMETER name: type:.FooInterface4.FooInterface4> + $receiver: VALUE_PARAMETER name: type:kotlin.Int diff --git a/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.fir.txt b/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.fir.txt new file mode 100644 index 0000000..79c33a7 --- /dev/null +++ b/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.fir.txt @@ -0,0 +1,145 @@ +FILE: Main.kt + public abstract interface Foo : R|kotlin/Any| { + } + public abstract interface Bar : R|Foo| { + } + public abstract interface FooInterface1 : R|kotlin/Any| { + public abstract suspend fun data(): R|T| + + public abstract suspend fun data2(value: R|A|): R|T| + + public abstract suspend fun R|kotlin/Int|.data3(): R|T| + + } + public final class FooInterface1Impl : R|FooInterface1| { + public constructor(): R|FooInterface1Impl| { + super() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data(): R|T| { + ^data R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data2(value: R|A|): R|T| { + ^data2 R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun R|kotlin/Int|.data3(): R|T| { + ^data3 R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun data2Blocking(value: R|A|): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun dataBlocking(): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun R|kotlin/Int|.data3Blocking(): R|T| + + } + public abstract interface FooInterface2 : R|kotlin/Any| { + public abstract suspend fun data(): R|T| + + public abstract suspend fun data2(value: R|T|): R|T| + + public abstract suspend fun R|kotlin/Int|.data3(): R|T| + + } + public final class FooInterface2Impl : R|FooInterface2| { + public constructor(): R|FooInterface2Impl| { + super() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data(): R|T| { + ^data R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data2(value: R|T|): R|T| { + ^data2 R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun R|kotlin/Int|.data3(): R|T| { + ^data3 R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun data2Blocking(value: R|T|): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun dataBlocking(): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun R|kotlin/Int|.data3Blocking(): R|T| + + } + public abstract interface FooInterface3 : R|kotlin/Any| { + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public abstract suspend fun data(): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public abstract suspend fun data2(value: R|A|): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public abstract suspend fun R|kotlin/Int|.data3(): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun data2Blocking(value: R|A|): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun dataBlocking(): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun R|kotlin/Int|.data3Blocking(): R|T| + + } + public final class FooInterface3Impl : R|FooInterface3| { + public constructor(): R|FooInterface3Impl| { + super() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data(): R|T| { + ^data R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data2(value: R|A|): R|T| { + ^data2 R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun R|kotlin/Int|.data3(): R|T| { + ^data3 R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun data2Blocking(value: R|A|): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open override fun dataBlocking(): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun R|kotlin/Int|.data3Blocking(): R|T| + + } + public abstract interface FooInterface4 : R|kotlin/Any| { + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public abstract suspend fun data(): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public abstract suspend fun data2(value: R|T|): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public abstract suspend fun R|kotlin/Int|.data3(): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun data2Blocking(value: R|T|): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun dataBlocking(): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun R|kotlin/Int|.data3Blocking(): R|T| + + } + public final class FooInterface4Impl : R|FooInterface4| { + public constructor(): R|FooInterface4Impl| { + super() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data(): R|T| { + ^data R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun data2(value: R|T|): R|T| { + ^data2 R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/JvmBlocking|() public open override suspend fun R|kotlin/Int|.data3(): R|T| { + ^data3 R|kotlin/TODO|() + } + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open override fun data2Blocking(value: R|T|): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open override fun dataBlocking(): R|T| + + @R|love/forte/plugin/suspendtrans/annotation/Api4J|() public open fun R|kotlin/Int|.data3Blocking(): R|T| + + } diff --git a/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.kt b/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.kt new file mode 100644 index 0000000..e2c1e26 --- /dev/null +++ b/compiler/suspend-transform-plugin/src/testData/codegen/implOverridenGeneric.kt @@ -0,0 +1,83 @@ +// FIR_DUMP +// DUMP_IR +// SOURCE +// FILE: Main.kt [MainKt#main] + +interface Foo +interface Bar : Foo + + +interface FooInterface1 { + suspend fun data(): T + suspend fun data2(value: A): T + suspend fun Int.data3(): T +} + +class FooInterface1Impl : FooInterface1 { + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data(): T = TODO() + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data2(value: A): T = TODO() + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun Int.data3(): T = TODO() +} + +interface FooInterface2 { + suspend fun data(): T + suspend fun data2(value: T): T + suspend fun Int.data3(): T +} + +class FooInterface2Impl : FooInterface2 { + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data(): T = TODO() + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data2(value: T): T = TODO() + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun Int.data3(): T = TODO() +} + +interface FooInterface3 { + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + suspend fun data(): T + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + suspend fun data2(value: A): T + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + suspend fun Int.data3(): T +} + +class FooInterface3Impl : FooInterface3 { + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data(): T = TODO() + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data2(value: A): T = TODO() + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun Int.data3(): T = TODO() +} + +interface FooInterface4 { + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + suspend fun data(): T + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + suspend fun data2(value: T): T + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + suspend fun Int.data3(): T +} + +class FooInterface4Impl : FooInterface4 { + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data(): T = TODO() + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun data2(value: T): T = TODO() + + @love.forte.plugin.suspendtrans.annotation.JvmBlocking + override suspend fun Int.data3(): T = TODO() +} + diff --git a/tests/test-js/build.gradle.kts b/tests/test-js/build.gradle.kts index 5c30d53..06b1e46 100644 --- a/tests/test-js/build.gradle.kts +++ b/tests/test-js/build.gradle.kts @@ -15,7 +15,8 @@ buildscript { mavenCentral() } dependencies { - classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:2.1.0-Beta1-0.9.2") + classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:2.1.0-Beta1-0.9.3") + classpath("org.jetbrains.kotlin:kotlin-compiler:2.1.0-Beta1") } } diff --git a/tests/test-js/src/jsMain/kotlin/FooInterface.kt b/tests/test-js/src/jsMain/kotlin/FooInterface.kt new file mode 100644 index 0000000..022e552 --- /dev/null +++ b/tests/test-js/src/jsMain/kotlin/FooInterface.kt @@ -0,0 +1,80 @@ +@file:OptIn(ExperimentalJsExport::class) +@file:JsExport + +import love.forte.plugin.suspendtrans.annotation.JsPromise + +/** + * + * @author ForteScarlet + */ +interface FooInterface { + @JsExport.Ignore + suspend fun run1(value: Int): String + + @JsExport.Ignore + suspend fun run2(): String +} + +class FooImpl : FooInterface { + @JsExport.Ignore + @JsPromise + override suspend fun run1(value: Int): String = value.toString() + + @JsExport.Ignore + @JsPromise // TODO asProperty + override suspend fun run2(): String = "" +} + +/** + * + * @author ForteScarlet + */ +interface FooInterface2 { + @JsExport.Ignore + @JsPromise + suspend fun run1(value: Int): String + + @JsExport.Ignore + @JsPromise // TODO asProperty + suspend fun run2(): String +} + + +class FooImpl2 : FooInterface2 { + @JsExport.Ignore + @JsPromise + override suspend fun run1(value: Int): String = value.toString() + + @JsExport.Ignore + @JsPromise // TODO asProperty + override suspend fun run2(): String = "" +} + + +/** + * + * @author ForteScarlet + */ +interface FooInterface3 { + @JsExport.Ignore + suspend fun run1(value: Int): String + + fun run1Blocking(value: Int): String = value.toString() + + @JsExport.Ignore + @JsName("suspend_run2") + suspend fun run2(): String + + val run2: String get() = "" +} + + +class FooImpl3 : FooInterface3 { + @JsExport.Ignore + @JsPromise + override suspend fun run1(value: Int): String = value.toString() + + @JsExport.Ignore + @JsPromise // asProperty + override suspend fun run2(): String = "" +} diff --git a/tests/test-jvm/build.gradle.kts b/tests/test-jvm/build.gradle.kts index c772570..f618f67 100644 --- a/tests/test-jvm/build.gradle.kts +++ b/tests/test-jvm/build.gradle.kts @@ -19,7 +19,7 @@ buildscript { mavenCentral() } dependencies { - classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:2.1.0-Beta1-0.9.2") + classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:2.1.0-Beta1-0.9.3") classpath("org.jetbrains.kotlin:kotlin-compiler:2.1.0-Beta1") } } diff --git a/tests/test-jvm/src/main/kotlin/love/forte/plugin/suspendtrans/sample/FooInterface.kt b/tests/test-jvm/src/main/kotlin/love/forte/plugin/suspendtrans/sample/FooInterface.kt new file mode 100644 index 0000000..507d8bf --- /dev/null +++ b/tests/test-jvm/src/main/kotlin/love/forte/plugin/suspendtrans/sample/FooInterface.kt @@ -0,0 +1,74 @@ +package love.forte.plugin.suspendtrans.sample + +import love.forte.plugin.suspendtrans.annotation.JvmAsync +import love.forte.plugin.suspendtrans.annotation.JvmBlocking + + + +/** + * + * @author ForteScarlet + */ +interface FooInterface { + suspend fun run1(value: Int): String + suspend fun run2(): String +} + +class FooImpl : FooInterface { + @JvmBlocking + @JvmAsync + override suspend fun run1(value: Int): String = value.toString() + + @JvmBlocking(asProperty = true) + @JvmAsync(asProperty = true) + override suspend fun run2(): String = "" +} + +/** + * + * @author ForteScarlet + */ +interface FooInterface2 { + @JvmBlocking + suspend fun run1(value: Int): String + + @JvmBlocking(asProperty = true) + suspend fun run2(): String +} + + +class FooImpl2 : FooInterface2 { + @JvmBlocking + @JvmAsync + override suspend fun run1(value: Int): String = value.toString() + + @JvmBlocking(asProperty = true) + @JvmAsync(asProperty = true) + override suspend fun run2(): String = "" +} + + +/** + * + * @author ForteScarlet + */ +interface FooInterface3 { + suspend fun run1(value: Int): String + + fun run1Blocking(value: Int): String = value.toString() + + suspend fun run2(): String + + val run2: String get() = "" +} + + +class FooImpl3 : FooInterface3 { + @JvmBlocking + @JvmAsync + override suspend fun run1(value: Int): String = value.toString() + + @JvmBlocking(asProperty = true) + @JvmAsync(asProperty = true) + override suspend fun run2(): String = "" +} From 8e7da52548fc19128711c77815af504b813d2444 Mon Sep 17 00:00:00 2001 From: ForteScarlet Date: Sun, 6 Oct 2024 00:29:56 +0800 Subject: [PATCH 2/2] fix stack overflows --- .../fir/SuspendTransformFirTransformer.kt | 31 +++++++------------ 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt index 74c7279..eef98a7 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt @@ -95,6 +95,13 @@ class SuspendTransformFirTransformer( return names } + private val scope = ScopeSession() + private val holder = SessionHolderImpl(session, scope) + private val checkContext = MutableCheckerContext( + holder, + ReturnTypeCalculatorForFullBodyResolve.Default, + ) + @OptIn(SymbolInternals::class) override fun generateFunctions( callableId: CallableId, @@ -107,19 +114,13 @@ class SuspendTransformFirTransformer( val funList = mutableListOf() - val scope = ScopeSession() - val holder = SessionHolderImpl(session, scope) - val checkContext = MutableCheckerContext( - holder, - ReturnTypeCalculatorForFullBodyResolve.Default, - ) - funcMap.forEach { (func, funData) -> - // Check the overridden for isOverride based on source function (func) 's overridden - val isOverride = checkSyntheticFunctionIsOverrideBasedOnSourceFunction(funData, func, checkContext) val annotationData = funData.annotationData if (!annotationData.asProperty) { + // Check the overridden for isOverride based on source function (func) 's overridden + val isOverride = checkSyntheticFunctionIsOverrideBasedOnSourceFunction(funData, func, checkContext) + // generate val originFunc = func.fir @@ -198,19 +199,11 @@ class SuspendTransformFirTransformer( val propList = mutableListOf() - val scope = ScopeSession() - val holder = SessionHolderImpl(session, scope) - val checkContext = MutableCheckerContext( - holder, - ReturnTypeCalculatorForFullBodyResolve.Contract, - ) - funcMap.forEach { (func, funData) -> - - val isOverride = checkSyntheticFunctionIsOverrideBasedOnSourceFunction(funData, func, checkContext) - val annotationData = funData.annotationData if (annotationData.asProperty) { + val isOverride = checkSyntheticFunctionIsOverrideBasedOnSourceFunction(funData, func, checkContext) + // generate val original = func.fir