[FIR] Automatically make field mutable if it has replace function

This commit is contained in:
Dmitriy Novozhilov
2019-10-14 15:11:20 +03:00
parent 89fc17da41
commit f86f582922
2 changed files with 5 additions and 2 deletions
@@ -473,6 +473,9 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
value = "null"
withGetter = true
}
default("boundSymbol") {
isMutable = false
}
}
impl(superReference, "FirExplicitSuperReference")
@@ -93,7 +93,7 @@ class FieldWithDefault(val origin: Field) : Field() {
}
}
open class SimpleField(
class SimpleField(
override val name: String,
override val type: String,
override val packageName: String?,
@@ -105,7 +105,7 @@ open class SimpleField(
override val fullQualifiedName: String?
get() = customType?.fullQualifiedName ?: super.fullQualifiedName
override var isMutable: Boolean = false
override var isMutable: Boolean = withReplace
override fun internalCopy(): Field {
return SimpleField(