diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/builtin/KirBuiltins.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/builtin/KirBuiltins.kt index 9b71c19c..040b101f 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/builtin/KirBuiltins.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/builtin/KirBuiltins.kt @@ -59,7 +59,7 @@ class KirBuiltins( val kotlinSuperType = KotlinTypeFactory.simpleType( baseType = extraDescriptorBuiltins.NSMutableDictionary.defaultType, - arguments = listOf(keyArgument, valueArgument) + arguments = listOf(keyArgument, valueArgument), ) superTypes.add( diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/element/KirClass.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/element/KirClass.kt index 8ce02867..30db059c 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/element/KirClass.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/element/KirClass.kt @@ -1,7 +1,6 @@ package co.touchlab.skie.kir.element import co.touchlab.skie.kir.configuration.KirConfiguration -import co.touchlab.skie.kir.irbuilder.impl.namespace.nameOrError import co.touchlab.skie.kir.type.ReferenceKirType import co.touchlab.skie.oir.element.OirClass import co.touchlab.skie.sir.element.SirClass @@ -92,7 +91,6 @@ val KirClass.classDescriptorOrNull: ClassDescriptor? val KirClass.classDescriptorOrError: ClassDescriptor get() = classDescriptorOrNull ?: error("Class descriptor is not available for file classes. Was: $this") - val KirClass.sourceFileOrNull: SourceFile? get() = when (val descriptor = descriptor) { is KirClass.Descriptor.Class -> null diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/element/KirEnumEntry.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/element/KirEnumEntry.kt index 9504d1dc..2e4ab3c9 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/element/KirEnumEntry.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/kir/element/KirEnumEntry.kt @@ -14,5 +14,6 @@ class KirEnumEntry( init { parent.enumEntries.add(this) } + override fun toString(): String = "${this::class.simpleName}: $descriptor" } diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/OirProvider.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/OirProvider.kt index bd855816..b6fe6076 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/OirProvider.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/OirProvider.kt @@ -2,10 +2,7 @@ package co.touchlab.skie.oir import co.touchlab.skie.kir.KirProvider import co.touchlab.skie.kir.descriptor.ExtraDescriptorBuiltins -import co.touchlab.skie.kir.element.KirClass import co.touchlab.skie.kir.element.KirModule -import co.touchlab.skie.kir.element.classDescriptorOrNull -import co.touchlab.skie.kir.element.sourceFileOrNull import co.touchlab.skie.oir.builtin.OirBuiltins import co.touchlab.skie.oir.element.OirClass import co.touchlab.skie.oir.element.OirFile diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/builtin/OirBuiltins.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/builtin/OirBuiltins.kt index 39d30ead..7ccaa0be 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/builtin/OirBuiltins.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/builtin/OirBuiltins.kt @@ -5,7 +5,6 @@ import co.touchlab.skie.oir.OirProvider import co.touchlab.skie.oir.element.OirClass import co.touchlab.skie.oir.element.OirTypeParameter import co.touchlab.skie.oir.element.toTypeParameterUsage -import co.touchlab.skie.oir.type.TypeParameterUsageOirType @Suppress("PropertyName") class OirBuiltins( diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/SirPhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/SirPhase.kt index 8a50b6f2..f471e9c5 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/SirPhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/SirPhase.kt @@ -11,7 +11,6 @@ import co.touchlab.skie.sir.SkieNamespaceProvider import co.touchlab.skie.sir.builtin.SirBuiltins import co.touchlab.skie.sir.type.translation.SirTypeTranslator import org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportNamer -import org.jetbrains.kotlin.builtins.KotlinBuiltIns interface SirPhase : SkiePhase { diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/enums/ExhaustiveEnumsGenerator.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/enums/ExhaustiveEnumsGenerator.kt index 183900ec..62bf3f76 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/enums/ExhaustiveEnumsGenerator.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/enums/ExhaustiveEnumsGenerator.kt @@ -12,10 +12,10 @@ import co.touchlab.skie.sir.element.SirClass import co.touchlab.skie.sir.element.SirEnumCase import co.touchlab.skie.sir.element.SirExtension import co.touchlab.skie.sir.element.SirFile -import co.touchlab.skie.sir.element.SirSimpleFunction import co.touchlab.skie.sir.element.SirGetter import co.touchlab.skie.sir.element.SirProperty import co.touchlab.skie.sir.element.SirScope +import co.touchlab.skie.sir.element.SirSimpleFunction import co.touchlab.skie.sir.element.SirTypeAlias import co.touchlab.skie.sir.element.SirVisibility import co.touchlab.skie.sir.element.isExported diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/enums/ObjCBridgeable.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/enums/ObjCBridgeable.kt index 6db4c074..bb436bfe 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/enums/ObjCBridgeable.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/enums/ObjCBridgeable.kt @@ -4,8 +4,8 @@ import co.touchlab.skie.kir.element.KirClass import co.touchlab.skie.kir.element.KirEnumEntry import co.touchlab.skie.phases.SirPhase import co.touchlab.skie.sir.element.SirClass -import co.touchlab.skie.sir.element.SirSimpleFunction import co.touchlab.skie.sir.element.SirScope +import co.touchlab.skie.sir.element.SirSimpleFunction import co.touchlab.skie.sir.element.SirTypeAlias import co.touchlab.skie.sir.element.SirValueParameter import co.touchlab.skie.sir.element.SirVisibility diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/flow/ConvertFlowsPhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/flow/ConvertFlowsPhase.kt index 5ea41332..5702990b 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/flow/ConvertFlowsPhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/flow/ConvertFlowsPhase.kt @@ -4,8 +4,8 @@ import co.touchlab.skie.kir.element.KirCallableDeclaration import co.touchlab.skie.kir.element.KirClass import co.touchlab.skie.kir.element.KirConstructor import co.touchlab.skie.kir.element.KirFunction -import co.touchlab.skie.kir.element.KirSimpleFunction import co.touchlab.skie.kir.element.KirProperty +import co.touchlab.skie.kir.element.KirSimpleFunction import co.touchlab.skie.kir.element.KirValueParameter import co.touchlab.skie.kir.element.classDescriptorOrError import co.touchlab.skie.kir.type.BlockPointerKirType diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/functions/FileScopeConversionParentProvider.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/functions/FileScopeConversionParentProvider.kt index 245755db..abc7ed45 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/functions/FileScopeConversionParentProvider.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/functions/FileScopeConversionParentProvider.kt @@ -10,8 +10,8 @@ import co.touchlab.skie.sir.element.SirExtension import co.touchlab.skie.sir.element.SirFile import co.touchlab.skie.sir.element.SirSimpleFunction import co.touchlab.skie.sir.element.receiverDeclaration -import co.touchlab.skie.sir.element.resolveAsSirClassType import co.touchlab.skie.sir.element.resolveAsSirClass +import co.touchlab.skie.sir.element.resolveAsSirClassType import co.touchlab.skie.sir.type.DeclaredSirType import co.touchlab.skie.sir.type.NullableSirType import co.touchlab.skie.sir.type.OirDeclaredSirType diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/functions/FileScopeConvertor.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/functions/FileScopeConvertor.kt index 0ecb9b47..0f727f3e 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/functions/FileScopeConvertor.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/functions/FileScopeConvertor.kt @@ -5,8 +5,8 @@ import co.touchlab.skie.configuration.getConfiguration import co.touchlab.skie.kir.element.KirCallableDeclaration import co.touchlab.skie.kir.element.KirClass import co.touchlab.skie.kir.element.KirConstructor -import co.touchlab.skie.kir.element.KirSimpleFunction import co.touchlab.skie.kir.element.KirProperty +import co.touchlab.skie.kir.element.KirSimpleFunction import co.touchlab.skie.phases.SirPhase class FileScopeConvertor( diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/suspend/SkieClassSuspendGenerator.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/suspend/SkieClassSuspendGenerator.kt index ecc3415c..c8f5eec1 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/suspend/SkieClassSuspendGenerator.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/suspend/SkieClassSuspendGenerator.kt @@ -4,8 +4,8 @@ import co.touchlab.skie.kir.element.KirClass import co.touchlab.skie.phases.SirPhase import co.touchlab.skie.sir.element.SirClass import co.touchlab.skie.sir.element.SirConstructor -import co.touchlab.skie.sir.element.SirSimpleFunction import co.touchlab.skie.sir.element.SirProperty +import co.touchlab.skie.sir.element.SirSimpleFunction import co.touchlab.skie.sir.element.SirValueParameter import co.touchlab.skie.sir.element.SirVisibility import co.touchlab.skie.sir.element.copyTypeParametersFrom diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/suspend/SwiftSuspendGeneratorDelegate.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/suspend/SwiftSuspendGeneratorDelegate.kt index 35700cca..cb34c04e 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/suspend/SwiftSuspendGeneratorDelegate.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/features/suspend/SwiftSuspendGeneratorDelegate.kt @@ -164,7 +164,8 @@ private data class BridgeModel( val kotlinBridgingKirFunction: KirSimpleFunction, ) { - val originalFunction: SirSimpleFunction = suspendKirFunction.bridgedSirFunction ?: error("Suspend function $suspendKirFunction does not have an async bridge.") + val originalFunction: SirSimpleFunction = + suspendKirFunction.bridgedSirFunction ?: error("Suspend function $suspendKirFunction does not have an async bridge.") val kotlinBridgingFunction: SirSimpleFunction = kotlinBridgingKirFunction.originalSirFunction diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/header/FixForwardDeclarationsPhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/header/FixForwardDeclarationsPhase.kt index ec76803e..38384097 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/header/FixForwardDeclarationsPhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/header/FixForwardDeclarationsPhase.kt @@ -1,6 +1,5 @@ package co.touchlab.skie.phases.header -import co.touchlab.skie.oir.element.OirClass import co.touchlab.skie.oir.element.renderForwardDeclaration import co.touchlab.skie.phases.SirPhase import co.touchlab.skie.phases.header.util.BaseHeaderModificationPhase diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/kir/CreateKirMembersPhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/kir/CreateKirMembersPhase.kt index 4eec224f..ef18e13c 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/kir/CreateKirMembersPhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/kir/CreateKirMembersPhase.kt @@ -7,9 +7,9 @@ import co.touchlab.skie.kir.element.KirCallableDeclaration.Origin import co.touchlab.skie.kir.element.KirClass import co.touchlab.skie.kir.element.KirConstructor import co.touchlab.skie.kir.element.KirFunction -import co.touchlab.skie.kir.element.KirSimpleFunction import co.touchlab.skie.kir.element.KirProperty import co.touchlab.skie.kir.element.KirScope +import co.touchlab.skie.kir.element.KirSimpleFunction import co.touchlab.skie.kir.element.KirValueParameter import co.touchlab.skie.kir.util.addOverrides import co.touchlab.skie.oir.element.OirFunction diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/memberconflicts/UniqueSignatureSet.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/memberconflicts/UniqueSignatureSet.kt index 9a0ab34c..e2bcc71e 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/memberconflicts/UniqueSignatureSet.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/memberconflicts/UniqueSignatureSet.kt @@ -2,8 +2,8 @@ package co.touchlab.skie.phases.memberconflicts import co.touchlab.skie.sir.element.SirCallableDeclaration import co.touchlab.skie.sir.element.SirConstructor -import co.touchlab.skie.sir.element.SirSimpleFunction import co.touchlab.skie.sir.element.SirProperty +import co.touchlab.skie.sir.element.SirSimpleFunction import co.touchlab.skie.sir.element.getEntireOverrideHierarchy class UniqueSignatureSet { @@ -52,8 +52,8 @@ class UniqueSignatureSet { val lastValueParameter = this.valueParameters.lastOrNull() ?: error( "Cannot mangle $this because it does not have any value parameters. " + - "This should never happen because constructors without value parameters " + - "shouldn't create conflicts (as they are processed first)." + "This should never happen because constructors without value parameters " + + "shouldn't create conflicts (as they are processed first).", ) lastValueParameter.label = lastValueParameter.labelOrName + "_" diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/oir/CreateFakeObjCConstructorsPhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/oir/CreateFakeObjCConstructorsPhase.kt index 14120a8c..0fc9effa 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/oir/CreateFakeObjCConstructorsPhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/oir/CreateFakeObjCConstructorsPhase.kt @@ -7,7 +7,6 @@ import co.touchlab.skie.oir.element.constructors import co.touchlab.skie.oir.element.copyValueParametersFrom import co.touchlab.skie.oir.element.superClass import co.touchlab.skie.phases.SirPhase -import co.touchlab.skie.sir.element.SirConstructor import co.touchlab.skie.sir.element.SirVisibility import co.touchlab.skie.sir.element.copyValueParametersFrom import co.touchlab.skie.sir.element.shallowCopy diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/other/ExtraClassExportPhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/other/ExtraClassExportPhase.kt index 06d0bc9e..6d6caeb4 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/other/ExtraClassExportPhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/other/ExtraClassExportPhase.kt @@ -69,7 +69,7 @@ class ExtraClassExportPhase( } val allFlowArguments = descriptorProvider.allExposedMembers.flatMap { it.getAllFlowArgumentClasses() } + - descriptorProvider.exposedClasses.flatMap { it.getAllFlowArgumentClasses() } + descriptorProvider.exposedClasses.flatMap { it.getAllFlowArgumentClasses() } val allExposableFlowArguments = allFlowArguments.filter { descriptorProvider.isExposable(it) } @@ -139,12 +139,12 @@ private fun ClassDescriptor.getAllFlowArgumentClasses(): List = private fun CallableMemberDescriptor.getAllFlowArgumentClasses(): List = typeParameters.flatMap { it.getAllFlowArgumentClasses() } + - valueParameters.flatMap { it.type.getAllFlowArgumentClasses() } + - (returnType?.getAllFlowArgumentClasses() ?: emptyList()) + - (contextReceiverParameters + listOfNotNull( - dispatchReceiverParameter, - extensionReceiverParameter - )).flatMap { it.getAllFlowArgumentClasses() } + valueParameters.flatMap { it.type.getAllFlowArgumentClasses() } + + (returnType?.getAllFlowArgumentClasses() ?: emptyList()) + + (contextReceiverParameters + listOfNotNull( + dispatchReceiverParameter, + extensionReceiverParameter, + )).flatMap { it.getAllFlowArgumentClasses() } // Sacrifices some completeness for simplicity - otherwise it would have to check all usages of the type parameter. private fun TypeParameterDescriptor.getAllFlowArgumentClasses(): List = diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/other/VerifyMinOSVersionPhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/other/VerifyMinOSVersionPhase.kt index ef7329ab..b889f5ba 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/other/VerifyMinOSVersionPhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/other/VerifyMinOSVersionPhase.kt @@ -22,8 +22,8 @@ object VerifyMinOSVersionPhase : ClassExportPhase { if (currentMinVersion.isLowerVersionThan(minRequiredVersion)) { error( "Minimum OS version for ${configurables.target.name} must be at least $minRequiredVersion to support Swift Async. " + - "However, the configured minimum OS version is only $currentMinVersion. " + - "This is most likely a bug in SKIE Gradle plugin which should have set the minimum required version automatically.", + "However, the configured minimum OS version is only $currentMinVersion. " + + "This is most likely a bug in SKIE Gradle plugin which should have set the minimum required version automatically.", ) } } diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/member/StripKonanCallableDeclarationManglingPhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/member/StripKonanCallableDeclarationManglingPhase.kt index 01ebfb93..27f225fe 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/member/StripKonanCallableDeclarationManglingPhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/member/StripKonanCallableDeclarationManglingPhase.kt @@ -2,8 +2,8 @@ package co.touchlab.skie.phases.sir.member import co.touchlab.skie.kir.element.KirCallableDeclaration import co.touchlab.skie.kir.element.KirConstructor -import co.touchlab.skie.kir.element.KirSimpleFunction import co.touchlab.skie.kir.element.KirProperty +import co.touchlab.skie.kir.element.KirSimpleFunction import co.touchlab.skie.kir.element.KirValueParameter import co.touchlab.skie.phases.SirPhase diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/type/CreateSirInternalTypeAliasesPhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/type/CreateSirInternalTypeAliasesPhase.kt index 7471ba0f..df7063ad 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/type/CreateSirInternalTypeAliasesPhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/type/CreateSirInternalTypeAliasesPhase.kt @@ -1,7 +1,6 @@ package co.touchlab.skie.phases.sir.type import co.touchlab.skie.kir.element.KirClass -import co.touchlab.skie.kir.element.classDescriptorOrNull import co.touchlab.skie.phases.SirPhase import co.touchlab.skie.sir.element.SirTypeAlias import co.touchlab.skie.sir.element.SirVisibility diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/swift/SwiftCacheSetupPhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/swift/SwiftCacheSetupPhase.kt index 0b2f1739..15e01a4c 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/swift/SwiftCacheSetupPhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/swift/SwiftCacheSetupPhase.kt @@ -24,9 +24,9 @@ object SwiftCacheSetupPhase : SirPhase { // Must use `or` to prevent short circuit optimization. return framework.kotlinHeader.copyFileToIfDifferent(dummyFramework.kotlinHeader) or - framework.modulemapFile.copyFileToIfDifferent(dummyFramework.modulemapFile) or - skieBuildDirectory.swiftCompiler.apiNotes.apiNotes(framework.moduleName) - .copyFileToIfDifferent(dummyFramework.apiNotes) + framework.modulemapFile.copyFileToIfDifferent(dummyFramework.modulemapFile) or + skieBuildDirectory.swiftCompiler.apiNotes.apiNotes(framework.moduleName) + .copyFileToIfDifferent(dummyFramework.apiNotes) } // Solves a bug in Swift compiler. diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/typeconflicts/RenameTypesConflictingWithKotlinModulePhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/typeconflicts/RenameTypesConflictingWithKotlinModulePhase.kt index 65c00aab..9eaa5f0d 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/typeconflicts/RenameTypesConflictingWithKotlinModulePhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/typeconflicts/RenameTypesConflictingWithKotlinModulePhase.kt @@ -26,7 +26,7 @@ object RenameTypesConflictingWithKotlinModulePhase : SirPhase { private fun logModuleNameCollisionWarning(moduleName: String) { reporter.warning( "Type '$moduleName' was renamed to '${moduleName}_' " + - "because it has the same name as the produced framework which is forbidden.", + "because it has the same name as the produced framework which is forbidden.", ) } } diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/element/SirConstructor.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/element/SirConstructor.kt index 35358c6a..8bd3a40c 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/element/SirConstructor.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/element/SirConstructor.kt @@ -1,7 +1,6 @@ package co.touchlab.skie.sir.element import co.touchlab.skie.sir.element.util.sirDeclarationParent -import io.outfoxx.swiftpoet.FunctionSpec import io.outfoxx.swiftpoet.Modifier class SirConstructor( diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/type/LambdaSirType.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/type/LambdaSirType.kt index bfbbc799..dbcf87ad 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/type/LambdaSirType.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/type/LambdaSirType.kt @@ -1,7 +1,6 @@ package co.touchlab.skie.sir.type import co.touchlab.skie.sir.element.SirTypeParameter -import co.touchlab.skie.sir.element.toTypeParameterUsage import io.outfoxx.swiftpoet.AttributeSpec import io.outfoxx.swiftpoet.FunctionTypeName import io.outfoxx.swiftpoet.ParameterSpec diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/type/OirDeclaredSirType.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/type/OirDeclaredSirType.kt index 468123bd..10c760ac 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/type/OirDeclaredSirType.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/sir/type/OirDeclaredSirType.kt @@ -37,7 +37,7 @@ data class OirDeclaredSirType( private fun getType(selectedClass: SirClass): SirDeclaredSirType { val convertedTypeArguments = selectedClass.typeParameters - .mapIndexed { index, typeParameter -> typeParameter to (typeArguments.getOrNull(index) ?: SpecialReferenceOirType.Id) } + .mapIndexed { index, typeParameter -> typeParameter to (typeArguments.getOrNull(index) ?: SpecialReferenceOirType.Id) } .map { (typeParameter, typeArgument) -> mapTypeArgument(typeArgument, typeParameter) }