K2: reproduce KT-59140

This commit is contained in:
Mikhail Glukhikh
2023-06-16 14:41:35 +02:00
committed by Space Team
parent c2fde1a915
commit 18206210cf
7 changed files with 72 additions and 0 deletions
@@ -20174,6 +20174,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/j+k/specialBridges.kt");
}
@Test
@TestMetadata("staticImportViaInheritance.kt")
public void testStaticImportViaInheritance() throws Exception {
runTest("compiler/testData/diagnostics/tests/j+k/staticImportViaInheritance.kt");
}
@Test
@TestMetadata("StaticMembersFromSuperclasses.kt")
public void testStaticMembersFromSuperclasses() throws Exception {
@@ -20174,6 +20174,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/j+k/specialBridges.kt");
}
@Test
@TestMetadata("staticImportViaInheritance.kt")
public void testStaticImportViaInheritance() throws Exception {
runTest("compiler/testData/diagnostics/tests/j+k/staticImportViaInheritance.kt");
}
@Test
@TestMetadata("StaticMembersFromSuperclasses.kt")
public void testStaticMembersFromSuperclasses() throws Exception {
@@ -20174,6 +20174,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/j+k/specialBridges.kt");
}
@Test
@TestMetadata("staticImportViaInheritance.kt")
public void testStaticImportViaInheritance() throws Exception {
runTest("compiler/testData/diagnostics/tests/j+k/staticImportViaInheritance.kt");
}
@Test
@TestMetadata("StaticMembersFromSuperclasses.kt")
public void testStaticMembersFromSuperclasses() throws Exception {
@@ -20180,6 +20180,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/j+k/specialBridges.kt");
}
@Test
@TestMetadata("staticImportViaInheritance.kt")
public void testStaticImportViaInheritance() throws Exception {
runTest("compiler/testData/diagnostics/tests/j+k/staticImportViaInheritance.kt");
}
@Test
@TestMetadata("StaticMembersFromSuperclasses.kt")
public void testStaticMembersFromSuperclasses() throws Exception {
@@ -0,0 +1,21 @@
// ISSUE: KT-59140
// FILE: pkg/Foo.java
package pkg;
abstract class CommonFoo {
public static final int BAR = 1;
}
public class Foo extends CommonFoo {}
// FILE: test.kt
import pkg.Foo
import pkg.Foo.BAR
fun test() {
val bar = <!INVISIBLE_REFERENCE!>BAR<!>
val fooBar = Foo.BAR
}
@@ -0,0 +1,21 @@
// ISSUE: KT-59140
// FILE: pkg/Foo.java
package pkg;
abstract class CommonFoo {
public static final int BAR = 1;
}
public class Foo extends CommonFoo {}
// FILE: test.kt
import pkg.Foo
import pkg.Foo.BAR
fun test() {
val bar = BAR
val fooBar = Foo.BAR
}
@@ -20180,6 +20180,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/j+k/specialBridges.kt");
}
@Test
@TestMetadata("staticImportViaInheritance.kt")
public void testStaticImportViaInheritance() throws Exception {
runTest("compiler/testData/diagnostics/tests/j+k/staticImportViaInheritance.kt");
}
@Test
@TestMetadata("StaticMembersFromSuperclasses.kt")
public void testStaticMembersFromSuperclasses() throws Exception {