diff --git a/SKIE/acceptance-tests b/SKIE/acceptance-tests index 28513e22..fccbfefd 160000 --- a/SKIE/acceptance-tests +++ b/SKIE/acceptance-tests @@ -1 +1 @@ -Subproject commit 28513e2285b52bff1231a5cd945aa4aa896f0342 +Subproject commit fccbfefd538dc5f70d18f6f5c4bedfcdb5f8aa6c diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/element/OirCallableDeclaration.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/element/OirCallableDeclaration.kt index 3e57b9e0..8827cc35 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/element/OirCallableDeclaration.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/oir/element/OirCallableDeclaration.kt @@ -17,6 +17,7 @@ sealed interface OirCallableDeclaration : OirElement { val deprecationLevel: DeprecationLevel + // TODO This is likely not needed val visibility: OirVisibility get() = originalSirCallableDeclaration.visibility.toOirVisibility() 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 0b48a512..261fe56e 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 @@ -177,7 +177,7 @@ class CreateKirMembersPhase( createProperty(descriptor, kirClass, origin) } - private fun getOrCreateOverridenProperty(descriptor: PropertyDescriptor, origin: Origin): KirProperty { + private fun getOrCreateOverriddenProperty(descriptor: PropertyDescriptor, origin: Origin): KirProperty { val classDescriptor = descriptorProvider.getReceiverClassDescriptorOrNull(descriptor) ?: error("Unsupported property $descriptor") @@ -203,13 +203,13 @@ class CreateKirMembersPhase( origin = origin, scope = kirClass.callableDeclarationScope, type = kirTypeTranslator.mapReturnType(originalDescriptor.getter!!, getterBridge.returnBridge), - isVar = descriptor.isVar, + isVar = descriptor.setter?.let { descriptorProvider.isExposable(it) } ?: false, deprecationLevel = descriptor.kirDeprecationLevel, isRefinedInSwift = baseDescriptor.isRefinedInSwift, ) getDirectParents(descriptor) - .map { getOrCreateOverridenProperty(it, origin) } + .map { getOrCreateOverriddenProperty(it, origin) } .let { property.addOverrides(it) } return property diff --git a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/member/CreateSirMembersPhase.kt b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/member/CreateSirMembersPhase.kt index 21a9c612..5eb67dc3 100644 --- a/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/member/CreateSirMembersPhase.kt +++ b/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/phases/sir/member/CreateSirMembersPhase.kt @@ -100,7 +100,8 @@ class CreateSirMembersPhase( throws = false, ) } - property.descriptor.setter?.let { + + if (property.isVar) { SirSetter( throws = false, )