[FIR] Fix effective visibility handling for local members
In future 'Local' effective visibility could be used as a flag of local declaration
This commit is contained in:
@@ -183,10 +183,13 @@ sealed class FirEffectiveVisibilityImpl(
|
||||
override fun toVisibility() = Visibilities.PRIVATE
|
||||
}
|
||||
|
||||
override fun lowerBound(other: FirEffectiveVisibility) = when (relation(other)) {
|
||||
Permissiveness.SAME, Permissiveness.LESS -> this
|
||||
Permissiveness.MORE -> other
|
||||
Permissiveness.UNKNOWN -> Private
|
||||
override fun lowerBound(other: FirEffectiveVisibility): FirEffectiveVisibility {
|
||||
if (this == Local || other == Local) return Local
|
||||
return when (relation(other)) {
|
||||
Permissiveness.SAME, Permissiveness.LESS -> this
|
||||
Permissiveness.MORE -> other
|
||||
Permissiveness.UNKNOWN -> Private
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
Reference in New Issue
Block a user