IR: make IrDeclarationWithVisibility.visibility mutable

It was mutable anyway in many subclasses. This is needed in order to
avoid depending on concrete IR implementations in the JVM IR backend
where it's necessary to be able to change visibility.
This commit is contained in:
Alexander Udalov
2020-07-07 22:13:51 +02:00
parent 96f0a8e8e5
commit e8c3c70369
11 changed files with 17 additions and 32 deletions
@@ -72,8 +72,11 @@ class Fir2IrLazySimpleFunction(
override val name: Name
get() = fir.name
override val visibility: Visibility
override var visibility: Visibility
get() = fir.visibility
set(_) {
error("Mutating Fir2Ir lazy elements is not possible")
}
override val modality: Modality
get() = fir.modality!!