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
@@ -31494,6 +31494,28 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
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, TargetBackend.JVM_IR, 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
@@ -31494,6 +31494,28 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated
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, TargetBackend.JVM_IR, 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
@@ -31494,6 +31494,28 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
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, TargetBackend.JVM_IR, 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
@@ -13,10 +13,7 @@ import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
import org.jetbrains.kotlin.ir.symbols.IrSymbol
import org.jetbrains.kotlin.ir.types.*
import org.jetbrains.kotlin.ir.util.collectAndFilterRealOverrides
import org.jetbrains.kotlin.ir.util.fileOrNull
import org.jetbrains.kotlin.ir.util.isFromJava
import org.jetbrains.kotlin.ir.util.render
import org.jetbrains.kotlin.ir.util.*
import org.jetbrains.kotlin.resolve.OverridingUtil.OverrideCompatibilityInfo
import org.jetbrains.kotlin.types.AbstractTypeChecker
import org.jetbrains.kotlin.types.TypeCheckerState
@@ -65,30 +62,56 @@ class IrFakeOverrideBuilder(
*/
fun buildFakeOverridesForClass(clazz: IrClass, oldSignatures: Boolean) {
strategy.inFile(clazz.fileOrNull) {
val allFromSuper = clazz.superTypes.flatMap { superType ->
val superClass = superType.getClass() ?: error("Unexpected super type: $superType")
superClass.declarations
.filterIsInstance<IrOverridableMember>()
.mapNotNull {
val fakeOverride = strategy.fakeOverrideMember(superType, it, clazz) ?: return@mapNotNull null
FakeOverride(fakeOverride, it)
}
}
val (staticMembers, instanceMembers) =
clazz.declarations.filterIsInstance<IrOverridableMember>().partition { it.isStaticMember }
val allFromSuperByName = allFromSuper.groupBy { it.override.name }
val allFromCurrentByName = clazz.declarations.filterIsInstance<IrOverridableMember>().groupBy { it.name }
buildFakeOverridesForClassImpl(clazz, instanceMembers, oldSignatures, clazz.superTypes) { !it.isStaticMember }
allFromSuperByName.forEach { (name, superMembers) ->
generateOverridesInFunctionGroup(
superMembers,
allFromCurrentByName[name] ?: emptyList(),
clazz,
oldSignatures
)
}
// Static Java members from the superclass need fake overrides in the subclass, to support the case when the static member is
// declared in an inaccessible grandparent class but is exposed as public in the parent. For example:
//
// class A { public static void f() {} }
// public class B extends A {}
//
// `A.f` is inaccessible from another package, but `B.f` is accessible from everywhere because Java doesn't have the
// "exposed visibility" error. Accessing the method via the class A would result in an IllegalAccessError at runtime, thus
// we need to generate a fake override in class B. This is only possible in case of superclasses, as static _interface_ members
// are not inherited (see JLS 8.4.8 and 9.4.1).
val superClass = clazz.superTypes.filter { it.classOrFail.owner.isClass }
buildFakeOverridesForClassImpl(clazz, staticMembers, oldSignatures, superClass) { it.isStaticMember }
}
}
private fun buildFakeOverridesForClassImpl(
clazz: IrClass,
allFromCurrent: List<IrOverridableMember>,
oldSignatures: Boolean,
supertypes: List<IrType>,
declarationFilter: (IrOverridableMember) -> Boolean,
) {
val allFromSuper = supertypes.flatMap { superType ->
superType.classOrFail.owner.declarations
.filterIsInstanceAnd<IrOverridableMember>(declarationFilter)
.mapNotNull {
val fakeOverride = strategy.fakeOverrideMember(superType, it, clazz) ?: return@mapNotNull null
FakeOverride(fakeOverride, it)
}
}
val allFromSuperByName = allFromSuper.groupBy { it.override.name }
val allFromCurrentByName = allFromCurrent.groupBy { it.name }
allFromSuperByName.forEach { (name, superMembers) ->
generateOverridesInFunctionGroup(
superMembers,
allFromCurrentByName[name] ?: emptyList(),
clazz,
oldSignatures
)
}
}
/**
* This function builds all missing fake overrides, assuming that already existing members have correct overriden symbols.
*
@@ -69,7 +69,6 @@ class IrOverrideChecker(
is IrSimpleFunction -> when {
subMember !is IrSimpleFunction -> return incompatible("Member kind mismatch")
superMember.hasExtensionReceiver != subMember.hasExtensionReceiver -> return incompatible("Receiver presence mismatch")
superMember.hasDispatchReceiver != subMember.hasDispatchReceiver -> return incompatible("Incompatible staticness")
superMember.isSuspend != subMember.isSuspend -> return incompatible("Incompatible suspendability")
checkIsInlineFlag && superMember.isInline -> return incompatible("Inline function can't be overridden")
@@ -83,7 +82,6 @@ class IrOverrideChecker(
is IrProperty -> when {
subMember !is IrProperty -> return incompatible("Member kind mismatch")
superMember.getter.hasExtensionReceiver != subMember.getter.hasExtensionReceiver -> return incompatible("Receiver presence mismatch")
superMember.getter.hasDispatchReceiver != subMember.getter.hasDispatchReceiver -> return incompatible("Incompatible staticness")
checkIsInlineFlag && superMember.isInline -> return incompatible("Inline property can't be overridden")
else -> {
@@ -0,0 +1,18 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// FILE: A.java
public interface A {
static String foo() { return "OK"; }
}
// FILE: B.java
public interface B {
static String foo() { return "Fail"; }
}
// FILE: box.kt
class C : A, B {
fun test(): String = A.foo()
}
fun box(): String = C().test()
@@ -0,0 +1,20 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// FILE: A.java
public class A {
protected String foo() { return "OK"; }
}
// FILE: B.java
public interface B {
static String foo() { return "Fail"; }
}
// FILE: box.kt
class C : A(), B {
override fun foo(): String = super.foo()
fun test(): String = foo()
}
fun box(): String = C().test()
@@ -31494,6 +31494,28 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency
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, TargetBackend.JVM_IR, 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
@@ -29700,6 +29700,28 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
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, TargetBackend.JVM, 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
@@ -31494,6 +31494,28 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
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, TargetBackend.JVM_IR, 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
@@ -31494,6 +31494,28 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
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, TargetBackend.JVM_IR, 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
@@ -26718,6 +26718,29 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance/nullableInt.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/javaInterop/statics")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Statics extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInStatics() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/statics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("inheritTwoStaticMethods.kt")
public void testInheritTwoStaticMethods() throws Exception {
runTest("compiler/testData/codegen/box/javaInterop/statics/inheritTwoStaticMethods.kt");
}
@TestMetadata("overrideInstanceMethodWithIrrelevantStatic.kt")
public void testOverrideInstanceMethodWithIrrelevantStatic() throws Exception {
runTest("compiler/testData/codegen/box/javaInterop/statics/overrideInstanceMethodWithIrrelevantStatic.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/box/javaVisibility")
@@ -22992,6 +22992,16 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
}
@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, TargetBackend.JS_IR, true);
}
}
}
@Nested
@@ -22992,6 +22992,16 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
}
@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, TargetBackend.JS_IR_ES6, true);
}
}
}
@Nested
@@ -22992,6 +22992,16 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
}
@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, TargetBackend.JS_IR, true);
}
}
}
@Nested
@@ -22992,6 +22992,16 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
}
@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, TargetBackend.JS_IR_ES6, true);
}
}
}
@Nested
@@ -26579,6 +26579,19 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/javaInterop/statics")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
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, TargetBackend.NATIVE, true);
}
}
}
@Nested
@@ -27123,6 +27123,21 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/javaInterop/statics")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
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, TargetBackend.NATIVE, true);
}
}
}
@Nested
@@ -26035,6 +26035,17 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/javaInterop/statics")
@TestDataPath("$PROJECT_ROOT")
@UseExtTestCaseGroupProvider()
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, TargetBackend.NATIVE, true);
}
}
}
@Nested
@@ -26580,6 +26580,19 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/javaInterop/statics")
@TestDataPath("$PROJECT_ROOT")
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
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, TargetBackend.NATIVE, true);
}
}
}
@Nested
@@ -22980,6 +22980,16 @@ public class FirWasmJsCodegenBoxTestGenerated extends AbstractFirWasmJsCodegenBo
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
}
@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, TargetBackend.WASM, true);
}
}
}
@Nested
@@ -22980,6 +22980,16 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/primitiveVsWrapperTypeInInheritance"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
}
@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, TargetBackend.WASM, true);
}
}
}
@Nested