[Test] Add test for KT-54125
This commit is contained in:
committed by
Space Team
parent
fa697f4eab
commit
5665139865
+6
@@ -33938,6 +33938,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/overrideOfMemberInPackagePrivateClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("packagePrivateStatic.kt")
|
||||
public void testPackagePrivateStatic() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/packagePrivateStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateCompanionInSuperClass.kt")
|
||||
public void testPrivateCompanionInSuperClass() throws Exception {
|
||||
|
||||
+6
@@ -33938,6 +33938,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/overrideOfMemberInPackagePrivateClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("packagePrivateStatic.kt")
|
||||
public void testPackagePrivateStatic() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/packagePrivateStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateCompanionInSuperClass.kt")
|
||||
public void testPrivateCompanionInSuperClass() throws Exception {
|
||||
|
||||
+6
@@ -33938,6 +33938,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/overrideOfMemberInPackagePrivateClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("packagePrivateStatic.kt")
|
||||
public void testPackagePrivateStatic() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/packagePrivateStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateCompanionInSuperClass.kt")
|
||||
public void testPrivateCompanionInSuperClass() throws Exception {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// ISSUE: KT-54125
|
||||
// FILE: foo/Base.java
|
||||
package foo;
|
||||
|
||||
class Base {
|
||||
protected static void foo() {}
|
||||
}
|
||||
|
||||
// FILE: foo/Derived.java
|
||||
package foo;
|
||||
|
||||
public class Derived extends Base {}
|
||||
|
||||
// FILE: main.kt
|
||||
package bar
|
||||
|
||||
import foo.Derived
|
||||
|
||||
class Impl : Derived() {
|
||||
fun test() {
|
||||
<!INVISIBLE_REFERENCE!>foo<!>()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// ISSUE: KT-54125
|
||||
// FILE: foo/Base.java
|
||||
package foo;
|
||||
|
||||
class Base {
|
||||
protected static void foo() {}
|
||||
}
|
||||
|
||||
// FILE: foo/Derived.java
|
||||
package foo;
|
||||
|
||||
public class Derived extends Base {}
|
||||
|
||||
// FILE: main.kt
|
||||
package bar
|
||||
|
||||
import foo.Derived
|
||||
|
||||
class Impl : Derived() {
|
||||
fun test() {
|
||||
foo()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package
|
||||
|
||||
package bar {
|
||||
|
||||
public final class Impl : foo.Derived {
|
||||
public constructor Impl()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
package foo {
|
||||
|
||||
public/*package*/ open class Base {
|
||||
public/*package*/ constructor Base()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
protected/*protected static*/ open fun foo(): kotlin.Unit
|
||||
}
|
||||
|
||||
public open class Derived : foo.Base {
|
||||
public constructor Derived()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
protected/*protected static*/ open override /*1*/ /*fake_override*/ fun foo(): kotlin.Unit
|
||||
}
|
||||
}
|
||||
Generated
+6
@@ -34028,6 +34028,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/overrideOfMemberInPackagePrivateClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("packagePrivateStatic.kt")
|
||||
public void testPackagePrivateStatic() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/packagePrivateStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateCompanionInSuperClass.kt")
|
||||
public void testPrivateCompanionInSuperClass() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user