FIR: Make replace function accepting parameter with nullability as-is
This commit is contained in:
+2
-4
@@ -67,7 +67,7 @@ fun transformFunctionDeclaration(transformName: String, returnType: String): Str
|
||||
|
||||
fun Field.replaceFunctionDeclaration(): String {
|
||||
val capName = name.capitalize()
|
||||
return "fun replace$capName(new$capName: $typeWithArgumentsWithoutNullablity)"
|
||||
return "fun replace$capName(new$capName: $typeWithArguments)"
|
||||
}
|
||||
|
||||
val Field.mutableType: String
|
||||
@@ -107,8 +107,6 @@ val Importable.typeWithArguments: String
|
||||
else -> throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
val Importable.typeWithArgumentsWithoutNullablity: String get() = typeWithArguments.dropLastWhile { it == '?' }
|
||||
|
||||
val ImplementationWithArg.generics: String
|
||||
get() = argument?.let { "<${it.type}>" } ?: ""
|
||||
|
||||
@@ -128,4 +126,4 @@ val Element.typeParameters: String
|
||||
?: ""
|
||||
|
||||
val Type.generics: String
|
||||
get() = arguments.takeIf { it.isNotEmpty() }?.joinToString(",", "<", ">") ?: ""
|
||||
get() = arguments.takeIf { it.isNotEmpty() }?.joinToString(",", "<", ">") ?: ""
|
||||
|
||||
Reference in New Issue
Block a user