[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 ----------- // ----------- Simple field -----------
fun field(name: String, type: TypeRef, nullable: Boolean = false, withReplace: Boolean = false): 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 { fun field(name: String, typeWithArgs: Pair<TypeRef, List<TypeRef>>, nullable: Boolean = false, withReplace: Boolean = false): Field {
val (type, args) = typeWithArgs 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 arguments += args
} }
} }
fun field(type: TypeRef, nullable: Boolean = false, withReplace: Boolean = false): Field { 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 { fun booleanField(name: String, withReplace: Boolean = false): Field {
@@ -153,7 +153,6 @@ class SimpleField(
override val name: String, override val name: String,
override val type: String, override val type: String,
override val packageName: String?, override val packageName: String?,
val customType: TypeRef? = null,
override val nullable: Boolean, override val nullable: Boolean,
override var withReplace: Boolean, override var withReplace: Boolean,
override var isVolatile: Boolean = false, override var isVolatile: Boolean = false,
@@ -162,9 +161,6 @@ class SimpleField(
override var isParameter: Boolean = false, override var isParameter: Boolean = false,
) : Field() { ) : Field() {
override val isFirType: Boolean = false override val isFirType: Boolean = false
override val fullQualifiedName: String?
get() = customType?.fullQualifiedName ?: super.fullQualifiedName
override var isMutable: Boolean = withReplace override var isMutable: Boolean = withReplace
override var isMutableOrEmpty: Boolean = false override var isMutableOrEmpty: Boolean = false
@@ -173,7 +169,6 @@ class SimpleField(
name = name, name = name,
type = type, type = type,
packageName = packageName, packageName = packageName,
customType = customType,
nullable = nullable, nullable = nullable,
withReplace = withReplace, withReplace = withReplace,
isVolatile = isVolatile, isVolatile = isVolatile,
@@ -189,7 +184,6 @@ class SimpleField(
name = name, name = name,
type = newType.type, type = newType.type,
packageName = newType.packageName, packageName = newType.packageName,
customType = customType,
nullable = nullable, nullable = nullable,
withReplace = withReplace, withReplace = withReplace,
isVolatile = isVolatile, isVolatile = isVolatile,