IR: check visibility when building fake overrides
This fixes the difference at least in the IR text test testFakeOverridesForJavaNonStaticMembers. There's no fake override created anymore for `packagePrivateMethod` in Test2. #KT-61366 Fixed
This commit is contained in:
committed by
Space Team
parent
a23f2894b2
commit
bb381e7aef
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.descriptors
|
||||
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue
|
||||
|
||||
abstract class DescriptorVisibility protected constructor() {
|
||||
@@ -78,6 +79,8 @@ abstract class DescriptorVisibility protected constructor() {
|
||||
|
||||
// Should be overloaded in Java visibilities
|
||||
fun customEffectiveVisibility(): EffectiveVisibility? = delegate.customEffectiveVisibility()
|
||||
|
||||
open fun visibleFromPackage(fromPackage: FqName, myPackage: FqName): Boolean = true
|
||||
}
|
||||
|
||||
abstract class DelegatedDescriptorVisibility(override val delegate: Visibility) : DescriptorVisibility() {
|
||||
|
||||
Reference in New Issue
Block a user