K2: fix visibility checks for static overrides via imported from static
#KT-53441 In Progress
This commit is contained in:
committed by
Space Team
parent
cc1a094b6c
commit
f070401bb5
@@ -6,6 +6,8 @@ package foo;
|
||||
class Base {
|
||||
protected static void foo() {}
|
||||
protected void bar() {}
|
||||
|
||||
public static void baz() {}
|
||||
}
|
||||
|
||||
// FILE: foo/Derived.java
|
||||
@@ -24,3 +26,15 @@ class Impl : Derived() {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
Derived.baz()
|
||||
}
|
||||
|
||||
// FILE: withImport.kt
|
||||
|
||||
import foo.Derived.baz
|
||||
|
||||
fun test() {
|
||||
baz()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
package bar {
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public final class Impl : foo.Derived {
|
||||
public constructor Impl()
|
||||
@@ -22,6 +25,7 @@ package foo {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public open fun baz(): kotlin.Unit
|
||||
protected/*protected static*/ open fun foo(): kotlin.Unit
|
||||
}
|
||||
|
||||
@@ -33,6 +37,7 @@ package foo {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public open override /*1*/ /*fake_override*/ fun baz(): kotlin.Unit
|
||||
protected/*protected static*/ open override /*1*/ /*fake_override*/ fun foo(): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user