Skip to content

Commit

Permalink
Merge all Kotlin internal type aliases from each module to a single f…
Browse files Browse the repository at this point in the history
…ile.
  • Loading branch information
FilipDolnik committed Nov 2, 2023
1 parent f6ba496 commit 55b4de5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ class SkieNamespaceProvider(
fun getFile(swiftModel: KotlinTypeSwiftModel): SirFile =
sirProvider.getFile(swiftModel.skieNamespaceName, swiftModel.skieFileName)

private fun getFile(classDescriptor: ClassDescriptor): SirFile =
sirProvider.getFile(classDescriptor.skieNamespaceName, classDescriptor.skieFileName)
private fun getNamespaceFile(classDescriptor: ClassDescriptor): SirFile =
sirProvider.getFile(classDescriptor.skieNamespaceName, "Skie")

fun getOrCreateNamespace(classDescriptor: ClassDescriptor): SirClass =
classNamespaceCache.getOrPut(classDescriptor) {
val parent = if (classDescriptor in descriptorProvider.exposedClasses) {
SirExtension(
classDeclaration = getNamespaceParent(classDescriptor),
parent = getFile(classDescriptor),
parent = getNamespaceFile(classDescriptor),
)
} else {
getNamespaceParent(classDescriptor)
Expand Down

0 comments on commit 55b4de5

Please sign in to comment.