@@ -88,7 +88,7 @@ class SkieNamespaceProvider(
88
88
89
89
private val KirModule .namespaceModuleName: String
90
90
get() {
91
- val canUseShortName = ! this .shortNameCollides && shortNamespaceModuleName != sirProvider.sirBuiltins.Skie .module.name.toValidNamespaceIdentifier ()
91
+ val canUseShortName = ! this .shortNameCollides && shortNamespaceModuleName != sirProvider.sirBuiltins.Skie .module.name.toValidSwiftIdentifier ()
92
92
93
93
return if (canUseShortName) this .shortNamespaceModuleName else this .fullNamespaceModuleName
94
94
}
@@ -103,15 +103,8 @@ class SkieNamespaceProvider(
103
103
private val KirModule .shortNameCollides: Boolean
104
104
get() = this in modulesWithShortNameCollision
105
105
106
- // WIP Remove after renaming all classes to avoid collision with ModuleName
107
- private fun String.toValidNamespaceIdentifier (): String {
108
- val defaultName = this .toValidSwiftIdentifier()
109
-
110
- return if (defaultName == sirProvider.sirBuiltins.Skie .module.name) defaultName + " _" else defaultName
111
- }
112
-
113
106
private val KirClass .skieNamespaceSimpleName: String
114
- get() = this .classDescriptorOrNull?.name?.identifier?.toValidNamespaceIdentifier () ? : this .name.swiftName
107
+ get() = this .classDescriptorOrNull?.name?.identifier?.toValidSwiftIdentifier () ? : this .name.swiftName
115
108
116
109
@Suppress(" RecursivePropertyAccessor" )
117
110
private val KirClass .skieFileName: String
@@ -121,12 +114,12 @@ class SkieNamespaceProvider(
121
114
get() = this .name
122
115
.substringAfter(" :" )
123
116
.changeNamingConventionToPascalCase()
124
- .toValidNamespaceIdentifier ()
117
+ .toValidSwiftIdentifier ()
125
118
126
119
private val KirModule .fullNamespaceModuleName: String
127
120
get() = this .name
128
121
.replace(" :" , " __" )
129
- .toValidNamespaceIdentifier ()
122
+ .toValidSwiftIdentifier ()
130
123
}
131
124
132
125
private fun String.changeNamingConventionToPascalCase (): String =
0 commit comments