JVM_IR no static inline class members for Kotlin JvmDefault methods

KT-43698 KT-43051
This commit is contained in:
Dmitry Petrov
2020-12-02 14:58:05 +03:00
parent 11673bd09c
commit e6a3e38c4d
29 changed files with 1044 additions and 43 deletions
@@ -15164,6 +15164,59 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8DefaultInterfaceMethods extends AbstractFirBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("javaDefaultMethod.kt")
public void testJavaDefaultMethod() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/javaDefaultMethod.kt");
}
@TestMetadata("javaDefaultMethodOverriddenByKotlin.kt")
public void testJavaDefaultMethodOverriddenByKotlin() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/javaDefaultMethodOverriddenByKotlin.kt");
}
@TestMetadata("jvmDefaultAll.kt")
public void testJvmDefaultAll() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAll.kt");
}
@TestMetadata("jvmDefaultAllPrimaryProperty.kt")
public void testJvmDefaultAllPrimaryProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllPrimaryProperty.kt");
}
@TestMetadata("jvmDefaultAllProperty.kt")
public void testJvmDefaultAllProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllProperty.kt");
}
@TestMetadata("jvmDefaultEnable.kt")
public void testJvmDefaultEnable() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnable.kt");
}
@TestMetadata("jvmDefaultEnablePrimaryProperty.kt")
public void testJvmDefaultEnablePrimaryProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnablePrimaryProperty.kt");
}
@TestMetadata("jvmDefaultEnableProperty.kt")
public void testJvmDefaultEnableProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnableProperty.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/propertyDelegation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.backend.jvm.JvmBackendContext
import org.jetbrains.kotlin.backend.jvm.JvmLoweredDeclarationOrigin
import org.jetbrains.kotlin.backend.jvm.codegen.classFileContainsMethod
import org.jetbrains.kotlin.backend.jvm.codegen.isJvmInterface
import org.jetbrains.kotlin.backend.jvm.ir.isCompiledToJvmDefault
import org.jetbrains.kotlin.backend.jvm.ir.isFromJava
import org.jetbrains.kotlin.backend.jvm.ir.isStaticInlineClassReplacement
import org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.InlineClassAbi.mangledNameFor
@@ -71,7 +72,7 @@ class MemoizedInlineClassReplacements(
when {
it.isRemoveAtSpecialBuiltinStub() ->
null
it.isInlineClassMemberFakeOverriddenFromDefaultJavaInterfaceMethod() ->
it.isInlineClassMemberFakeOverriddenFromJvmDefaultInterfaceMethod() ->
null
it.origin == IrDeclarationOrigin.IR_BUILTINS_STUB ->
createMethodReplacement(it)
@@ -97,14 +98,21 @@ class MemoizedInlineClassReplacements(
valueParameters.size == 1 &&
valueParameters[0].type.isInt()
private fun IrFunction.isInlineClassMemberFakeOverriddenFromDefaultJavaInterfaceMethod(): Boolean {
private fun IrFunction.isInlineClassMemberFakeOverriddenFromJvmDefaultInterfaceMethod(): Boolean {
if (this !is IrSimpleFunction) return false
if (!this.isFakeOverride) return false
val parentClass = parentClassOrNull ?: return false
if (!parentClass.isInline) return false
val overridden = resolveFakeOverride() ?: return false
return overridden.isFromJava() && overridden.modality != Modality.ABSTRACT && overridden.parentAsClass.isJvmInterface
if (!overridden.parentAsClass.isJvmInterface) return false
if (overridden.modality == Modality.ABSTRACT) return false
// We have a non-abstract interface member.
// It is a JVM default interface method if one of the following conditions are true:
// - it is a Java method,
// - it is a Kotlin function compiled to JVM default interface method.
return overridden.isFromJava() || overridden.isCompiledToJvmDefault(context.state.jvmDefaultMode)
}
/**
@@ -0,0 +1,38 @@
// TARGET_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// IGNORE_BACKEND: JVM
// ^ KT-43698, fixed in JVM_IR
// JVM_TARGET: 1.8
// FILE: javaDefaultMethod.kt
inline class K(val k: String) : J {
override fun get2() = k
}
fun box(): String {
val k = K("K")
val test1 = k.get1() + k.get2()
if (test1 != "OK") throw AssertionError("test1: $test1")
val j: J = k
val test2 = j.get1() + j.get2()
if (test2 != "OK") throw AssertionError("test2: $test2")
val test3 = JT.test(k)
if (test3 != "OK") throw AssertionError("test3: $test3")
return "OK"
}
// FILE: J.java
public interface J {
default String get1() { return "O"; }
default String get2() { return "Failed"; }
}
// FILE: JT.java
public class JT {
public static String test(J j) {
return j.get1() + j.get2();
}
}
@@ -0,0 +1,49 @@
// TARGET_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// IGNORE_BACKEND: JVM
// ^ KT-43698, fixed in JVM_IR
// JVM_TARGET: 1.8
// FILE: javaDefaultMethod.kt
interface K2 : J {
override fun get2() = "Kotlin"
}
inline class K(val k: String) : K2 {
override fun get2() = k
}
fun box(): String {
val k = K("K")
val test1 = k.get1() + k.get2()
if (test1 != "OK") throw AssertionError("test1: $test1")
val j: J = k
val test2 = j.get1() + j.get2()
if (test2 != "OK") throw AssertionError("test2: $test2")
val test3 = JT.test(k)
if (test3 != "OK") throw AssertionError("test3: $test3")
val k2: K2 = k
val test4 = k2.get1() + k2.get2()
if (test4 != "OK") throw AssertionError("test4: $test4")
val test5 = JT.test(k2)
if (test5 != "OK") throw AssertionError("test5: $test5")
return "OK"
}
// FILE: J.java
public interface J {
default String get1() { return "O"; }
default String get2() { return "Java"; }
}
// FILE: JT.java
public class JT {
public static String test(J j) {
return j.get1() + j.get2();
}
}
@@ -0,0 +1,48 @@
// !JVM_DEFAULT_MODE: all
// TARGET_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// IGNORE_BACKEND: JVM
// ^ KT-43698, fixed in JVM_IR
// WITH_RUNTIME
// JVM_TARGET: 1.8
// FILE: jvmDefaultAll.kt
interface IFooBar {
fun foo() = "O"
fun bar() = "Failed"
}
interface IFooBar2 : IFooBar
inline class Test1(val k: String): IFooBar {
override fun bar(): String = k
}
inline class Test2(val k: String): IFooBar2 {
override fun bar(): String = k
}
fun box(): String {
val k = Test1("K")
val ik: IFooBar = k
val k2 = Test2("K")
val ik2: IFooBar = k2
val ik3: IFooBar2 = k2
val test1 = k.foo() + k.bar()
if (test1 != "OK") throw AssertionError("test1: $test1")
val test2 = ik.foo() + ik.bar()
if (test2 != "OK") throw AssertionError("test2: $test2")
val test3 = k2.foo() + k2.bar()
if (test3 != "OK") throw AssertionError("test3: $test3")
val test4 = ik2.foo() + ik2.bar()
if (test4 != "OK") throw AssertionError("test4: $test4")
val test5 = ik3.foo() + ik3.bar()
if (test5 != "OK") throw AssertionError("test5: $test5")
return "OK"
}
@@ -0,0 +1,44 @@
// !JVM_DEFAULT_MODE: all
// TARGET_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// IGNORE_BACKEND: JVM
// ^ KT-43698, fixed in JVM_IR
// WITH_RUNTIME
// JVM_TARGET: 1.8
// FILE: jvmDefaultAll.kt
interface IFooBar {
val foo get() = "O"
val bar get() = "Failed"
}
interface IFooBar2 : IFooBar
inline class Test1(override val bar: String): IFooBar
inline class Test2(override val bar: String): IFooBar2
fun box(): String {
val k = Test1("K")
val ik: IFooBar = k
val k2 = Test2("K")
val ik2: IFooBar = k2
val ik3: IFooBar2 = k2
val test1 = k.foo + k.bar
if (test1 != "OK") throw AssertionError("test1: $test1")
val test2 = ik.foo + ik.bar
if (test2 != "OK") throw AssertionError("test2: $test2")
val test3 = k2.foo + k2.bar
if (test3 != "OK") throw AssertionError("test3: $test3")
val test4 = ik2.foo + ik2.bar
if (test4 != "OK") throw AssertionError("test4: $test4")
val test5 = ik3.foo + ik3.bar
if (test5 != "OK") throw AssertionError("test5: $test5")
return "OK"
}
@@ -0,0 +1,50 @@
// !JVM_DEFAULT_MODE: all
// TARGET_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// IGNORE_BACKEND: JVM
// ^ KT-43698, fixed in JVM_IR
// WITH_RUNTIME
// JVM_TARGET: 1.8
// FILE: jvmDefaultAll.kt
interface IFooBar {
val foo get() = "O"
val bar get() = "Failed"
}
interface IFooBar2 : IFooBar
inline class Test1(val k: String): IFooBar {
override val bar: String
get() = k
}
inline class Test2(val k: String): IFooBar2 {
override val bar: String
get() = k
}
fun box(): String {
val k = Test1("K")
val ik: IFooBar = k
val k2 = Test2("K")
val ik2: IFooBar = k2
val ik3: IFooBar2 = k2
val test1 = k.foo + k.bar
if (test1 != "OK") throw AssertionError("test1: $test1")
val test2 = ik.foo + ik.bar
if (test2 != "OK") throw AssertionError("test2: $test2")
val test3 = k2.foo + k2.bar
if (test3 != "OK") throw AssertionError("test3: $test3")
val test4 = ik2.foo + ik2.bar
if (test4 != "OK") throw AssertionError("test4: $test4")
val test5 = ik3.foo + ik3.bar
if (test5 != "OK") throw AssertionError("test5: $test5")
return "OK"
}
@@ -0,0 +1,48 @@
// !JVM_DEFAULT_MODE: enable
// TARGET_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// IGNORE_BACKEND: JVM
// ^ KT-43698, fixed in JVM_IR
// WITH_RUNTIME
// JVM_TARGET: 1.8
// FILE: jvmDefaultEnable.kt
interface IFooBar {
@JvmDefault fun foo() = "O"
@JvmDefault fun bar() = "Failed"
}
interface IFooBar2 : IFooBar
inline class Test1(val k: String): IFooBar {
override fun bar(): String = k
}
inline class Test2(val k: String): IFooBar2 {
override fun bar(): String = k
}
fun box(): String {
val k = Test1("K")
val ik: IFooBar = k
val k2 = Test2("K")
val ik2: IFooBar = k2
val ik3: IFooBar2 = k2
val test1 = k.foo() + k.bar()
if (test1 != "OK") throw AssertionError("test1: $test1")
val test2 = ik.foo() + ik.bar()
if (test2 != "OK") throw AssertionError("test2: $test2")
val test3 = k2.foo() + k2.bar()
if (test3 != "OK") throw AssertionError("test3: $test3")
val test4 = ik2.foo() + ik2.bar()
if (test4 != "OK") throw AssertionError("test4: $test4")
val test5 = ik3.foo() + ik3.bar()
if (test5 != "OK") throw AssertionError("test5: $test5")
return "OK"
}
@@ -0,0 +1,44 @@
// !JVM_DEFAULT_MODE: enable
// TARGET_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// IGNORE_BACKEND: JVM
// ^ KT-43698, fixed in JVM_IR
// WITH_RUNTIME
// JVM_TARGET: 1.8
// FILE: jvmDefaultEnable.kt
interface IFooBar {
@JvmDefault val foo get() = "O"
@JvmDefault val bar get() = "Failed"
}
interface IFooBar2 : IFooBar
inline class Test1(override val bar: String): IFooBar
inline class Test2(override val bar: String): IFooBar2
fun box(): String {
val k = Test1("K")
val ik: IFooBar = k
val k2 = Test2("K")
val ik2: IFooBar = k2
val ik3: IFooBar2 = k2
val test1 = k.foo + k.bar
if (test1 != "OK") throw AssertionError("test1: $test1")
val test2 = ik.foo + ik.bar
if (test2 != "OK") throw AssertionError("test2: $test2")
val test3 = k2.foo + k2.bar
if (test3 != "OK") throw AssertionError("test3: $test3")
val test4 = ik2.foo + ik2.bar
if (test4 != "OK") throw AssertionError("test4: $test4")
val test5 = ik3.foo + ik3.bar
if (test5 != "OK") throw AssertionError("test5: $test5")
return "OK"
}
@@ -0,0 +1,50 @@
// !JVM_DEFAULT_MODE: enable
// TARGET_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// IGNORE_BACKEND: JVM
// ^ KT-43698, fixed in JVM_IR
// WITH_RUNTIME
// JVM_TARGET: 1.8
// FILE: jvmDefaultEnable.kt
interface IFooBar {
@JvmDefault val foo get() = "O"
@JvmDefault val bar get() = "Failed"
}
interface IFooBar2 : IFooBar
inline class Test1(val k: String): IFooBar {
override val bar: String
get() = k
}
inline class Test2(val k: String): IFooBar2 {
override val bar: String
get() = k
}
fun box(): String {
val k = Test1("K")
val ik: IFooBar = k
val k2 = Test2("K")
val ik2: IFooBar = k2
val ik3: IFooBar2 = k2
val test1 = k.foo + k.bar
if (test1 != "OK") throw AssertionError("test1: $test1")
val test2 = ik.foo + ik.bar
if (test2 != "OK") throw AssertionError("test2: $test2")
val test3 = k2.foo + k2.bar
if (test3 != "OK") throw AssertionError("test3: $test3")
val test4 = ik2.foo + ik2.bar
if (test4 != "OK") throw AssertionError("test4: $test4")
val test5 = ik3.foo + ik3.bar
if (test5 != "OK") throw AssertionError("test5: $test5")
return "OK"
}
@@ -0,0 +1,38 @@
// JVM_TARGET: 1.8
// FILE: javaDefaultInterfaceMember.kt
interface KFoo2 : JIFoo
interface KFooUnrelated {
fun foo()
}
interface KFoo3 : KFoo2, KFooUnrelated {
override fun foo() {}
}
interface KBar2 : JIBar
inline class TestFoo1(val x: Int) : JIFoo
inline class TestFoo2(val x: Int) : KFoo2
inline class TestFoo3(val x: Int) : KFoo3
inline class TestBar1(val x: Int) : JIBar {
override fun bar() {}
}
inline class TestBar2(val x: Int) : KBar2 {
override fun bar() {}
}
// FILE: JIFoo.java
public interface JIFoo {
default void foo() {}
}
// FILE: JIBar.java
public interface JIBar {
default void foo() {}
default void bar() {}
}
@@ -1,3 +1,8 @@
@kotlin.Metadata
public interface KBar2 {
// source: 'javaDefaultInterfaceMember.kt'
}
@kotlin.Metadata
public interface KFoo2 {
// source: 'javaDefaultInterfaceMember.kt'
@@ -25,11 +30,13 @@ public interface KFooUnrelated {
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class Test1 {
public final class TestBar1 {
// source: 'javaDefaultInterfaceMember.kt'
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static method box-impl(p0: int): Test1
public method bar(): void
public static method bar-impl(p0: int): void
public synthetic final static method box-impl(p0: int): TestBar1
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
@@ -44,11 +51,13 @@ public final class Test1 {
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class Test2 {
public final class TestBar2 {
// source: 'javaDefaultInterfaceMember.kt'
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static method box-impl(p0: int): Test2
public method bar(): void
public static method bar-impl(p0: int): void
public synthetic final static method box-impl(p0: int): TestBar2
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
@@ -63,11 +72,49 @@ public final class Test2 {
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class Test3 {
public final class TestFoo1 {
// source: 'javaDefaultInterfaceMember.kt'
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static method box-impl(p0: int): Test3
public synthetic final static method box-impl(p0: int): TestFoo1
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
public final static method equals-impl0(p0: int, p1: int): boolean
public final method getX(): int
public method hashCode(): int
public static method hashCode-impl(p0: int): int
public method toString(): java.lang.String
public static method toString-impl(p0: int): java.lang.String
public synthetic final method unbox-impl(): int
}
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class TestFoo2 {
// source: 'javaDefaultInterfaceMember.kt'
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static method box-impl(p0: int): TestFoo2
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
public final static method equals-impl0(p0: int, p1: int): boolean
public final method getX(): int
public method hashCode(): int
public static method hashCode-impl(p0: int): int
public method toString(): java.lang.String
public static method toString-impl(p0: int): java.lang.String
public synthetic final method unbox-impl(): int
}
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class TestFoo3 {
// source: 'javaDefaultInterfaceMember.kt'
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static method box-impl(p0: int): TestFoo3
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
@@ -0,0 +1,18 @@
// !JVM_DEFAULT_MODE: all
// WITH_RUNTIME
// JVM_TARGET: 1.8
interface IFooBar {
fun foo() = "O"
fun bar() = "Failed"
}
interface IFooBar2 : IFooBar
inline class Test1(val k: String): IFooBar {
override fun bar(): String = k
}
inline class Test2(val k: String): IFooBar2 {
override fun bar(): String = k
}
@@ -0,0 +1,53 @@
@kotlin.Metadata
public interface IFooBar {
// source: 'jvmDefaultAll.kt'
public @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public @org.jetbrains.annotations.NotNull method foo(): java.lang.String
}
@kotlin.Metadata
public interface IFooBar2 {
// source: 'jvmDefaultAll.kt'
}
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class Test1 {
// source: 'jvmDefaultAll.kt'
private final @org.jetbrains.annotations.NotNull field k: java.lang.String
private synthetic method <init>(p0: java.lang.String): void
public @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public static @org.jetbrains.annotations.NotNull method bar-impl(p0: java.lang.String): java.lang.String
public synthetic final static method box-impl(p0: java.lang.String): Test1
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, p1: java.lang.Object): boolean
public final static method equals-impl0(p0: java.lang.String, p1: java.lang.String): boolean
public final @org.jetbrains.annotations.NotNull method getK(): java.lang.String
public method hashCode(): int
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class Test2 {
// source: 'jvmDefaultAll.kt'
private final @org.jetbrains.annotations.NotNull field k: java.lang.String
private synthetic method <init>(p0: java.lang.String): void
public @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public static @org.jetbrains.annotations.NotNull method bar-impl(p0: java.lang.String): java.lang.String
public synthetic final static method box-impl(p0: java.lang.String): Test2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, p1: java.lang.Object): boolean
public final static method equals-impl0(p0: java.lang.String, p1: java.lang.String): boolean
public final @org.jetbrains.annotations.NotNull method getK(): java.lang.String
public method hashCode(): int
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@@ -0,0 +1,53 @@
@kotlin.Metadata
public interface IFooBar {
// source: 'jvmDefaultAll.kt'
public @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public @org.jetbrains.annotations.NotNull method foo(): java.lang.String
}
@kotlin.Metadata
public interface IFooBar2 {
// source: 'jvmDefaultAll.kt'
}
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class Test1 {
// source: 'jvmDefaultAll.kt'
private final @org.jetbrains.annotations.NotNull field k: java.lang.String
private synthetic method <init>(p0: java.lang.String): void
public @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public static @org.jetbrains.annotations.NotNull method bar-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public synthetic final static method box-impl(p0: java.lang.String): Test1
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, p1: java.lang.Object): boolean
public final static method equals-impl0(p0: java.lang.String, p1: java.lang.String): boolean
public final @org.jetbrains.annotations.NotNull method getK(): java.lang.String
public method hashCode(): int
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class Test2 {
// source: 'jvmDefaultAll.kt'
private final @org.jetbrains.annotations.NotNull field k: java.lang.String
private synthetic method <init>(p0: java.lang.String): void
public @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public static @org.jetbrains.annotations.NotNull method bar-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public synthetic final static method box-impl(p0: java.lang.String): Test2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, p1: java.lang.Object): boolean
public final static method equals-impl0(p0: java.lang.String, p1: java.lang.String): boolean
public final @org.jetbrains.annotations.NotNull method getK(): java.lang.String
public method hashCode(): int
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@@ -0,0 +1,18 @@
// !JVM_DEFAULT_MODE: enable
// WITH_RUNTIME
// JVM_TARGET: 1.8
interface IFooBar {
@JvmDefault fun foo() = "O"
@JvmDefault fun bar() = "Failed"
}
interface IFooBar2 : IFooBar
inline class Test1(val k: String): IFooBar {
override fun bar(): String = k
}
inline class Test2(val k: String): IFooBar2 {
override fun bar(): String = k
}
@@ -0,0 +1,53 @@
@kotlin.Metadata
public interface IFooBar {
// source: 'jvmDefaultEnable.kt'
public @kotlin.jvm.JvmDefault @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public @kotlin.jvm.JvmDefault @org.jetbrains.annotations.NotNull method foo(): java.lang.String
}
@kotlin.Metadata
public interface IFooBar2 {
// source: 'jvmDefaultEnable.kt'
}
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class Test1 {
// source: 'jvmDefaultEnable.kt'
private final @org.jetbrains.annotations.NotNull field k: java.lang.String
private synthetic method <init>(p0: java.lang.String): void
public @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public static @org.jetbrains.annotations.NotNull method bar-impl(p0: java.lang.String): java.lang.String
public synthetic final static method box-impl(p0: java.lang.String): Test1
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, p1: java.lang.Object): boolean
public final static method equals-impl0(p0: java.lang.String, p1: java.lang.String): boolean
public final @org.jetbrains.annotations.NotNull method getK(): java.lang.String
public method hashCode(): int
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class Test2 {
// source: 'jvmDefaultEnable.kt'
private final @org.jetbrains.annotations.NotNull field k: java.lang.String
private synthetic method <init>(p0: java.lang.String): void
public @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public static @org.jetbrains.annotations.NotNull method bar-impl(p0: java.lang.String): java.lang.String
public synthetic final static method box-impl(p0: java.lang.String): Test2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, p1: java.lang.Object): boolean
public final static method equals-impl0(p0: java.lang.String, p1: java.lang.String): boolean
public final @org.jetbrains.annotations.NotNull method getK(): java.lang.String
public method hashCode(): int
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@@ -0,0 +1,53 @@
@kotlin.Metadata
public interface IFooBar {
// source: 'jvmDefaultEnable.kt'
public @kotlin.jvm.JvmDefault @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public @kotlin.jvm.JvmDefault @org.jetbrains.annotations.NotNull method foo(): java.lang.String
}
@kotlin.Metadata
public interface IFooBar2 {
// source: 'jvmDefaultEnable.kt'
}
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class Test1 {
// source: 'jvmDefaultEnable.kt'
private final @org.jetbrains.annotations.NotNull field k: java.lang.String
private synthetic method <init>(p0: java.lang.String): void
public @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public static @org.jetbrains.annotations.NotNull method bar-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public synthetic final static method box-impl(p0: java.lang.String): Test1
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, p1: java.lang.Object): boolean
public final static method equals-impl0(p0: java.lang.String, p1: java.lang.String): boolean
public final @org.jetbrains.annotations.NotNull method getK(): java.lang.String
public method hashCode(): int
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class Test2 {
// source: 'jvmDefaultEnable.kt'
private final @org.jetbrains.annotations.NotNull field k: java.lang.String
private synthetic method <init>(p0: java.lang.String): void
public @org.jetbrains.annotations.NotNull method bar(): java.lang.String
public static @org.jetbrains.annotations.NotNull method bar-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public synthetic final static method box-impl(p0: java.lang.String): Test2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, p1: java.lang.Object): boolean
public final static method equals-impl0(p0: java.lang.String, p1: java.lang.String): boolean
public final @org.jetbrains.annotations.NotNull method getK(): java.lang.String
public method hashCode(): int
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@@ -1,22 +0,0 @@
// JVM_TARGET: 1.8
// FILE: javaDefaultInterfaceMember.kt
interface KFoo2 : JIFoo
interface KFooUnrelated {
fun foo()
}
interface KFoo3 : KFoo2, KFooUnrelated {
override fun foo() {}
}
inline class Test1(val x: Int) : JIFoo
inline class Test2(val x: Int) : KFoo2
inline class Test3(val x: Int) : KFoo3
// FILE: JIFoo.java
public interface JIFoo {
default void foo() {}
}
@@ -25,13 +25,14 @@ inline class B(val x: Int) : A
// 1 public static f-impl\(I\)Ljava/lang/String;
// 1 public f\(\)Ljava/lang/String;
// 1 public static g-impl\(I\)Ljava/lang/String;
// 0 public static g-impl\(I\)Ljava/lang/String;
// 0 public g\(\)Ljava/lang/String;
// 1 INVOKESTATIC B.g-impl \(I\)Ljava/lang/String;
// 0 INVOKESTATIC B.g-impl \(I\)Ljava/lang/String;
// JVM_TEMPLATES:
// 2 INVOKESTATIC B.f-impl \(I\)Ljava/lang/String;
// JVM_IR_TEMPLATES:
// 1 INVOKESTATIC B.f-impl \(I\)Ljava/lang/String;
@@ -16564,6 +16564,59 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8DefaultInterfaceMethods extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("javaDefaultMethod.kt")
public void testJavaDefaultMethod() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/javaDefaultMethod.kt");
}
@TestMetadata("javaDefaultMethodOverriddenByKotlin.kt")
public void testJavaDefaultMethodOverriddenByKotlin() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/javaDefaultMethodOverriddenByKotlin.kt");
}
@TestMetadata("jvmDefaultAll.kt")
public void testJvmDefaultAll() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAll.kt");
}
@TestMetadata("jvmDefaultAllPrimaryProperty.kt")
public void testJvmDefaultAllPrimaryProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllPrimaryProperty.kt");
}
@TestMetadata("jvmDefaultAllProperty.kt")
public void testJvmDefaultAllProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllProperty.kt");
}
@TestMetadata("jvmDefaultEnable.kt")
public void testJvmDefaultEnable() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnable.kt");
}
@TestMetadata("jvmDefaultEnablePrimaryProperty.kt")
public void testJvmDefaultEnablePrimaryProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnablePrimaryProperty.kt");
}
@TestMetadata("jvmDefaultEnableProperty.kt")
public void testJvmDefaultEnableProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnableProperty.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/propertyDelegation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -1007,11 +1007,6 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithManyKindsOfMembers.kt");
}
@TestMetadata("javaDefaultInterfaceMember.kt")
public void testJavaDefaultInterfaceMember() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/javaDefaultInterfaceMember.kt");
}
@TestMetadata("jvmName.kt")
public void testJvmName() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/jvmName.kt");
@@ -1072,6 +1067,34 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrimitive.kt");
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DefaultInterfaceMembers extends AbstractBytecodeListingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInDefaultInterfaceMembers() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("javaDefaultInterfaceMember.kt")
public void testJavaDefaultInterfaceMember() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers/javaDefaultInterfaceMember.kt");
}
@TestMetadata("jvmDefaultAll.kt")
public void testJvmDefaultAll() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers/jvmDefaultAll.kt");
}
@TestMetadata("jvmDefaultEnable.kt")
public void testJvmDefaultEnable() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers/jvmDefaultEnable.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollection")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -16564,6 +16564,59 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8DefaultInterfaceMethods extends AbstractLightAnalysisModeTest {
@TestMetadata("javaDefaultMethod.kt")
public void ignoreJavaDefaultMethod() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/javaDefaultMethod.kt");
}
@TestMetadata("javaDefaultMethodOverriddenByKotlin.kt")
public void ignoreJavaDefaultMethodOverriddenByKotlin() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/javaDefaultMethodOverriddenByKotlin.kt");
}
@TestMetadata("jvmDefaultAll.kt")
public void ignoreJvmDefaultAll() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAll.kt");
}
@TestMetadata("jvmDefaultAllPrimaryProperty.kt")
public void ignoreJvmDefaultAllPrimaryProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllPrimaryProperty.kt");
}
@TestMetadata("jvmDefaultAllProperty.kt")
public void ignoreJvmDefaultAllProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllProperty.kt");
}
@TestMetadata("jvmDefaultEnable.kt")
public void ignoreJvmDefaultEnable() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnable.kt");
}
@TestMetadata("jvmDefaultEnablePrimaryProperty.kt")
public void ignoreJvmDefaultEnablePrimaryProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnablePrimaryProperty.kt");
}
@TestMetadata("jvmDefaultEnableProperty.kt")
public void ignoreJvmDefaultEnableProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnableProperty.kt");
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/propertyDelegation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -15164,6 +15164,59 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8DefaultInterfaceMethods extends AbstractIrBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("javaDefaultMethod.kt")
public void testJavaDefaultMethod() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/javaDefaultMethod.kt");
}
@TestMetadata("javaDefaultMethodOverriddenByKotlin.kt")
public void testJavaDefaultMethodOverriddenByKotlin() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/javaDefaultMethodOverriddenByKotlin.kt");
}
@TestMetadata("jvmDefaultAll.kt")
public void testJvmDefaultAll() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAll.kt");
}
@TestMetadata("jvmDefaultAllPrimaryProperty.kt")
public void testJvmDefaultAllPrimaryProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllPrimaryProperty.kt");
}
@TestMetadata("jvmDefaultAllProperty.kt")
public void testJvmDefaultAllProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllProperty.kt");
}
@TestMetadata("jvmDefaultEnable.kt")
public void testJvmDefaultEnable() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnable.kt");
}
@TestMetadata("jvmDefaultEnablePrimaryProperty.kt")
public void testJvmDefaultEnablePrimaryProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnablePrimaryProperty.kt");
}
@TestMetadata("jvmDefaultEnableProperty.kt")
public void testJvmDefaultEnableProperty() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnableProperty.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/propertyDelegation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -977,11 +977,6 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithManyKindsOfMembers.kt");
}
@TestMetadata("javaDefaultInterfaceMember.kt")
public void testJavaDefaultInterfaceMember() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/javaDefaultInterfaceMember.kt");
}
@TestMetadata("jvmName.kt")
public void testJvmName() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/jvmName.kt");
@@ -1042,6 +1037,34 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrimitive.kt");
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DefaultInterfaceMembers extends AbstractIrBytecodeListingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInDefaultInterfaceMembers() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("javaDefaultInterfaceMember.kt")
public void testJavaDefaultInterfaceMember() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers/javaDefaultInterfaceMember.kt");
}
@TestMetadata("jvmDefaultAll.kt")
public void testJvmDefaultAll() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers/jvmDefaultAll.kt");
}
@TestMetadata("jvmDefaultEnable.kt")
public void testJvmDefaultEnable() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers/jvmDefaultEnable.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollection")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -13134,6 +13134,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8DefaultInterfaceMethods extends AbstractIrJsCodegenBoxES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/propertyDelegation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -13134,6 +13134,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8DefaultInterfaceMethods extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/propertyDelegation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -13199,6 +13199,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8DefaultInterfaceMethods extends AbstractJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/propertyDelegation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -7434,6 +7434,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Jvm8DefaultInterfaceMethods extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
}
@TestMetadata("compiler/testData/codegen/box/inlineClasses/propertyDelegation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)