[FIR generator] Remove unused customType property from SimpleField

This commit is contained in:
Sergej Jaskiewicz
2023-10-17 15:25:59 +03:00
committed by Space Team
parent 770332152b
commit f30bf0e7e2
2 changed files with 3 additions and 9 deletions
@@ -13,18 +13,18 @@ import org.jetbrains.kotlin.generators.tree.typeWithArguments
// ----------- Simple field -----------
fun field(name: String, type: TypeRef, nullable: Boolean = false, withReplace: Boolean = false): Field {
return SimpleField(name, type.typeWithArguments, type.packageName, null, nullable, withReplace)
return SimpleField(name, type.typeWithArguments, type.packageName, nullable, withReplace)
}
fun field(name: String, typeWithArgs: Pair<TypeRef, List<TypeRef>>, nullable: Boolean = false, withReplace: Boolean = false): Field {
val (type, args) = typeWithArgs
return SimpleField(name, type.typeWithArguments, type.packageName, null, nullable, withReplace).apply {
return SimpleField(name, type.typeWithArguments, type.packageName, nullable, withReplace).apply {
arguments += args
}
}
fun field(type: TypeRef, nullable: Boolean = false, withReplace: Boolean = false): Field {
return SimpleField(type.type.replaceFirstChar(Char::lowercaseChar), type.typeWithArguments, type.packageName, null, nullable, withReplace)
return SimpleField(type.type.replaceFirstChar(Char::lowercaseChar), type.typeWithArguments, type.packageName, nullable, withReplace)
}
fun booleanField(name: String, withReplace: Boolean = false): Field {
@@ -153,7 +153,6 @@ class SimpleField(
override val name: String,
override val type: String,
override val packageName: String?,
val customType: TypeRef? = null,
override val nullable: Boolean,
override var withReplace: Boolean,
override var isVolatile: Boolean = false,
@@ -162,9 +161,6 @@ class SimpleField(
override var isParameter: Boolean = false,
) : Field() {
override val isFirType: Boolean = false
override val fullQualifiedName: String?
get() = customType?.fullQualifiedName ?: super.fullQualifiedName
override var isMutable: Boolean = withReplace
override var isMutableOrEmpty: Boolean = false
@@ -173,7 +169,6 @@ class SimpleField(
name = name,
type = type,
packageName = packageName,
customType = customType,
nullable = nullable,
withReplace = withReplace,
isVolatile = isVolatile,
@@ -189,7 +184,6 @@ class SimpleField(
name = name,
type = newType.type,
packageName = newType.packageName,
customType = customType,
nullable = nullable,
withReplace = withReplace,
isVolatile = isVolatile,