IR: do not build fake overrides for static members of interfaces

Split members into static/non-static, and only build fake overrides for
inherited static members of classes.

 #KT-65276 Fixed
 #KT-65277 Fixed
This commit is contained in:
Alexander Udalov
2024-02-01 00:13:40 +01:00
committed by Space Team
parent b28339e8bc
commit d450e3074b
24 changed files with 417 additions and 25 deletions
@@ -31825,6 +31825,28 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
runTest("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance/nullableInt.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/javaInterop/statics")
@TestDataPath("$PROJECT_ROOT")
public class Statics {
@Test
public void testAllFilesPresentInStatics() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/statics"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("inheritTwoStaticMethods.kt")
public void testInheritTwoStaticMethods() throws Exception {
runTest("compiler/testData/codegen/box/javaInterop/statics/inheritTwoStaticMethods.kt");
}
@Test
@TestMetadata("overrideInstanceMethodWithIrrelevantStatic.kt")
public void testOverrideInstanceMethodWithIrrelevantStatic() throws Exception {
runTest("compiler/testData/codegen/box/javaInterop/statics/overrideInstanceMethodWithIrrelevantStatic.kt");
}
}
}
@Nested
@@ -31825,6 +31825,28 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
runTest("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance/nullableInt.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/javaInterop/statics")
@TestDataPath("$PROJECT_ROOT")
public class Statics {
@Test
public void testAllFilesPresentInStatics() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/statics"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("inheritTwoStaticMethods.kt")
public void testInheritTwoStaticMethods() throws Exception {
runTest("compiler/testData/codegen/box/javaInterop/statics/inheritTwoStaticMethods.kt");
}
@Test
@TestMetadata("overrideInstanceMethodWithIrrelevantStatic.kt")
public void testOverrideInstanceMethodWithIrrelevantStatic() throws Exception {
runTest("compiler/testData/codegen/box/javaInterop/statics/overrideInstanceMethodWithIrrelevantStatic.kt");
}
}
}
@Nested