Treat internal names with @PublishedApi annotation as exported.

This commit is contained in:
Alexander Gorshenev
2017-04-07 00:05:55 +03:00
committed by alexander-gorshenev
parent f14716dfc0
commit e3a253f508
@@ -54,6 +54,9 @@ internal tailrec fun DeclarationDescriptor.isExported(): Boolean {
if (this.annotations.hasAnnotation(exportForCompilerAnnotation)){
return true
}
if (this.annotations.hasAnnotation(publishedApiAnnotation)){
return true
}
if (this is ConstructorDescriptor && constructedClass.kind.isSingleton) {
@@ -82,6 +85,8 @@ private val exportForCppRuntimeAnnotation = FqName("konan.internal.ExportForCppR
private val exportForCompilerAnnotation = FqName("konan.internal.ExportForCompiler")
private val publishedApiAnnotation = FqName("kotlin.PublishedApi")
private fun acyclicTypeMangler(visited: MutableSet<TypeParameterDescriptor>, type: KotlinType): String {
val descriptor = TypeUtils.getTypeParameterDescriptorOrNull(type)
if (descriptor != null) {