Skip to content

Commit d285e19

Browse files
authored
Merge pull request #9731 from igfoo/igfoo/private
Kotlin: Make more methods private
2 parents 1997d6b + 3026456 commit d285e19

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

java/kotlin-extractor/src/main/kotlin/utils/JvmNames.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private val specialFunctions = mapOf(
5555

5656
private val specialFunctionShortNames = specialFunctions.keys.map { it.functionName }.toSet()
5757

58-
fun getSpecialJvmName(f: IrFunction): String? {
58+
private fun getSpecialJvmName(f: IrFunction): String? {
5959
if (specialFunctionShortNames.contains(f.name) && f is IrSimpleFunction) {
6060
f.allOverridden(true).forEach { overriddenFunc ->
6161
overriddenFunc.parentClassOrNull?.fqNameWhenAvailable?.let { parentFqName ->
@@ -87,4 +87,4 @@ fun getJvmName(container: IrAnnotationContainer): String? {
8787
}
8888
}
8989
return (container as? IrFunction)?.let { getSpecialJvmName(container) }
90-
}
90+
}

java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fun IrType.substituteTypeArguments(params: List<IrTypeParameter>, arguments: Lis
3737
else -> this
3838
}
3939

40-
fun IrSimpleType.substituteTypeArguments(substitutionMap: Map<IrTypeParameterSymbol, IrTypeArgument>): IrSimpleType {
40+
private fun IrSimpleType.substituteTypeArguments(substitutionMap: Map<IrTypeParameterSymbol, IrTypeArgument>): IrSimpleType {
4141
if (substitutionMap.isEmpty()) return this
4242

4343
val newArguments = arguments.map {
@@ -100,7 +100,7 @@ private fun subProjectedType(substitutionMap: Map<IrTypeParameterSymbol, IrTypeA
100100
}
101101
} ?: makeTypeProjection(t.substituteTypeArguments(substitutionMap), outerVariance)
102102

103-
fun IrTypeArgument.upperBound(context: IrPluginContext) =
103+
private fun IrTypeArgument.upperBound(context: IrPluginContext) =
104104
when(this) {
105105
is IrStarProjection -> context.irBuiltIns.anyNType
106106
is IrTypeProjection -> when(this.variance) {
@@ -111,7 +111,7 @@ fun IrTypeArgument.upperBound(context: IrPluginContext) =
111111
else -> context.irBuiltIns.anyNType
112112
}
113113

114-
fun IrTypeArgument.lowerBound(context: IrPluginContext) =
114+
private fun IrTypeArgument.lowerBound(context: IrPluginContext) =
115115
when(this) {
116116
is IrStarProjection -> context.irBuiltIns.nothingType
117117
is IrTypeProjection -> when(this.variance) {
@@ -200,7 +200,7 @@ fun IrTypeArgument.withQuestionMark(b: Boolean): IrTypeArgument =
200200

201201
typealias TypeSubstitution = (IrType, KotlinUsesExtractor.TypeContext, IrPluginContext) -> IrType
202202

203-
fun matchingTypeParameters(l: IrTypeParameter?, r: IrTypeParameter): Boolean {
203+
private fun matchingTypeParameters(l: IrTypeParameter?, r: IrTypeParameter): Boolean {
204204
if (l === r)
205205
return true
206206
if (l == null)

0 commit comments

Comments
 (0)