From 388aba5040fa82d97191cd9e8674fa9dd186470b Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Tue, 19 Sep 2017 11:35:35 +0300 Subject: [PATCH] Export property accessors if the property is exported This fixes `@PublishedApi` support for properties. --- .../jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt index 5a9085a5303..d7fc4cc2edf 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt @@ -71,6 +71,10 @@ internal tailrec fun DeclarationDescriptor.isExported(): Boolean { return constructedClass.isExported() } + if (this is PropertyAccessorDescriptor) { + return this.correspondingProperty.isExported() + } + if (this is DeclarationDescriptorWithVisibility && !this.visibility.isPublicAPI) { // If the declaration is explicitly marked as non-public, // then it must not be accessible from other modules.