JvmDefault: remove most tests on @JvmDefault
The tests are removed because JvmDefault is going to be deprecated with error in KT-54746 and removed later in KT-57696. Many of the removed tests already had existing counterparts with the new modes `all` and `all-compatibility`. In this change, I've added such tests where they were missing, and removed tests which were testing behavior specific to the JvmDefault annotation, such as some diagnostics. #KT-54746
This commit is contained in:
committed by
Space Team
parent
ace2279631
commit
3120a35a88
-84
@@ -36147,24 +36147,6 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/generic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaOverride.kt")
|
||||
public void testJavaOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaOverrideAll.kt")
|
||||
public void testJavaOverrideAll() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverrideAll.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultInInheritance.kt")
|
||||
public void testJvmDefaultInInheritance() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultInInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaults.kt")
|
||||
public void testJvmDefaults() throws Exception {
|
||||
@@ -36177,72 +36159,6 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultsWithJava.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noJvmDefaultFlag.kt")
|
||||
public void testNoJvmDefaultFlag() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/noJvmDefaultFlag.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("notInterface.kt")
|
||||
public void testNotInterface() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/notInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyAccessor.kt")
|
||||
public void testPropertyAccessor() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/propertyAccessor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleOverride.kt")
|
||||
public void testSimpleOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simplePropertyOverride.kt")
|
||||
public void testSimplePropertyOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simplePropertyOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCall.kt")
|
||||
public void testSuperCall() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity.kt")
|
||||
public void testSuperCallAmbiguity() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity2.kt")
|
||||
public void testSuperCallAmbiguity2() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity3.kt")
|
||||
public void testSuperCallAmbiguity3() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("target6.kt")
|
||||
public void testTarget6() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target6.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("target8.kt")
|
||||
public void testTarget8() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target8.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
-84
@@ -36147,24 +36147,6 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/generic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaOverride.kt")
|
||||
public void testJavaOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaOverrideAll.kt")
|
||||
public void testJavaOverrideAll() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverrideAll.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultInInheritance.kt")
|
||||
public void testJvmDefaultInInheritance() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultInInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaults.kt")
|
||||
public void testJvmDefaults() throws Exception {
|
||||
@@ -36177,72 +36159,6 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultsWithJava.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noJvmDefaultFlag.kt")
|
||||
public void testNoJvmDefaultFlag() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/noJvmDefaultFlag.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("notInterface.kt")
|
||||
public void testNotInterface() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/notInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyAccessor.kt")
|
||||
public void testPropertyAccessor() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/propertyAccessor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleOverride.kt")
|
||||
public void testSimpleOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simplePropertyOverride.kt")
|
||||
public void testSimplePropertyOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simplePropertyOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCall.kt")
|
||||
public void testSuperCall() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity.kt")
|
||||
public void testSuperCallAmbiguity() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity2.kt")
|
||||
public void testSuperCallAmbiguity2() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity3.kt")
|
||||
public void testSuperCallAmbiguity3() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("target6.kt")
|
||||
public void testTarget6() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target6.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("target8.kt")
|
||||
public void testTarget8() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target8.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
-84
@@ -36147,24 +36147,6 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/generic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaOverride.kt")
|
||||
public void testJavaOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaOverrideAll.kt")
|
||||
public void testJavaOverrideAll() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverrideAll.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultInInheritance.kt")
|
||||
public void testJvmDefaultInInheritance() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultInInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaults.kt")
|
||||
public void testJvmDefaults() throws Exception {
|
||||
@@ -36177,72 +36159,6 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultsWithJava.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noJvmDefaultFlag.kt")
|
||||
public void testNoJvmDefaultFlag() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/noJvmDefaultFlag.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("notInterface.kt")
|
||||
public void testNotInterface() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/notInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyAccessor.kt")
|
||||
public void testPropertyAccessor() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/propertyAccessor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleOverride.kt")
|
||||
public void testSimpleOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simplePropertyOverride.kt")
|
||||
public void testSimplePropertyOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simplePropertyOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCall.kt")
|
||||
public void testSuperCall() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity.kt")
|
||||
public void testSuperCallAmbiguity() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity2.kt")
|
||||
public void testSuperCallAmbiguity2() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity3.kt")
|
||||
public void testSuperCallAmbiguity3() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("target6.kt")
|
||||
public void testTarget6() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target6.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("target8.kt")
|
||||
public void testTarget8() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target8.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
-84
@@ -36243,24 +36243,6 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/generic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaOverride.kt")
|
||||
public void testJavaOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaOverrideAll.kt")
|
||||
public void testJavaOverrideAll() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverrideAll.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultInInheritance.kt")
|
||||
public void testJvmDefaultInInheritance() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultInInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaults.kt")
|
||||
public void testJvmDefaults() throws Exception {
|
||||
@@ -36273,72 +36255,6 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultsWithJava.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noJvmDefaultFlag.kt")
|
||||
public void testNoJvmDefaultFlag() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/noJvmDefaultFlag.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("notInterface.kt")
|
||||
public void testNotInterface() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/notInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyAccessor.kt")
|
||||
public void testPropertyAccessor() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/propertyAccessor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleOverride.kt")
|
||||
public void testSimpleOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simplePropertyOverride.kt")
|
||||
public void testSimplePropertyOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simplePropertyOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCall.kt")
|
||||
public void testSuperCall() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity.kt")
|
||||
public void testSuperCallAmbiguity() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity2.kt")
|
||||
public void testSuperCallAmbiguity2() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallAmbiguity3.kt")
|
||||
public void testSuperCallAmbiguity3() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("target6.kt")
|
||||
public void testTarget6() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target6.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("target8.kt")
|
||||
public void testTarget8() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target8.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+129
-435
@@ -8063,6 +8063,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callStackTrace.kt")
|
||||
public void testCallStackTrace() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/callStackTrace.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCall.kt")
|
||||
public void testSuperCall() throws Exception {
|
||||
@@ -8075,12 +8081,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallFromInterface2.kt")
|
||||
public void testSuperCallFromInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superPropAccess.kt")
|
||||
public void testSuperPropAccess() throws Exception {
|
||||
@@ -8093,12 +8093,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superPropAccessFromInterface2.kt")
|
||||
public void testSuperPropAccessFromInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -8229,28 +8223,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
public void testNewAndOldSchemes3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("newSchemeWithJvmDefault.kt")
|
||||
public void testNewSchemeWithJvmDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/noDefaultImpls")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class NoDefaultImpls {
|
||||
@Test
|
||||
public void testAllFilesPresentInNoDefaultImpls() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/noDefaultImpls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superPropAccessFromInterface.kt")
|
||||
public void testSuperPropAccessFromInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/noDefaultImpls/superPropAccessFromInterface.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11591,12 +11563,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
public void testDisable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/jvmDefault/kt46007/disable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enable.kt")
|
||||
public void testEnable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/jvmDefault/kt46007/enable.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24745,18 +24711,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/all-compatibilityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("compatibility.kt")
|
||||
public void testCompatibility() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/compatibility.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("compatibilityGeneric.kt")
|
||||
public void testCompatibilityGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/compatibilityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("default.kt")
|
||||
public void testDefault() throws Exception {
|
||||
@@ -24803,18 +24757,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/all-compatibilityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("compatibility.kt")
|
||||
public void testCompatibility() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/compatibility.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("compatibilityGeneric.kt")
|
||||
public void testCompatibilityGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/compatibilityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("default.kt")
|
||||
public void testDefault() throws Exception {
|
||||
@@ -25822,42 +25764,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllPropertyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnable.kt")
|
||||
public void testJvmDefaultEnable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnable.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnableGeneric.kt")
|
||||
public void testJvmDefaultEnableGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnablePrimaryProperty.kt")
|
||||
public void testJvmDefaultEnablePrimaryProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnablePrimaryProperty.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnablePrimaryPropertyGeneric.kt")
|
||||
public void testJvmDefaultEnablePrimaryPropertyGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnablePrimaryPropertyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnableProperty.kt")
|
||||
public void testJvmDefaultEnableProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnableProperty.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnablePropertyGeneric.kt")
|
||||
public void testJvmDefaultEnablePropertyGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnablePropertyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultGeneric.kt")
|
||||
public void testJvmDefaultGeneric() throws Exception {
|
||||
@@ -30005,71 +29911,11 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
@TestMetadata("compiler/testData/codegen/box/jvm8/defaults")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Defaults {
|
||||
@Test
|
||||
@TestMetadata("26360.kt")
|
||||
public void test26360() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/26360.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("accessor.kt")
|
||||
public void testAccessor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/accessor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("accessorFromCompanion.kt")
|
||||
public void testAccessorFromCompanion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/accessorFromCompanion.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("accessorsFromDefaultImpls.kt")
|
||||
public void testAccessorsFromDefaultImpls() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/accessorsFromDefaultImpls.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInDefaults() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeInClass.kt")
|
||||
public void testBridgeInClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeInInterface.kt")
|
||||
public void testBridgeInInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeInInterface2.kt")
|
||||
public void testBridgeInInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterface2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeInInterfaceWithProperties.kt")
|
||||
public void testBridgeInInterfaceWithProperties() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterfaceWithProperties.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeInInterfaceWithProperties2.kt")
|
||||
public void testBridgeInInterfaceWithProperties2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterfaceWithProperties2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeWithJava.kt")
|
||||
public void testBridgeWithJava() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeWithJava.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("builtInsInherited.kt")
|
||||
public void testBuiltInsInherited() throws Exception {
|
||||
@@ -30077,135 +29923,9 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callableReference.kt")
|
||||
public void testCallableReference() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/callableReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("capturedSuperCall.kt")
|
||||
public void testCapturedSuperCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/capturedSuperCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgs.kt")
|
||||
public void testDefaultArgs() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/defaultArgs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgsViaAnonymousObject.kt")
|
||||
public void testDefaultArgsViaAnonymousObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/defaultArgsViaAnonymousObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("diamond.kt")
|
||||
public void testDiamond() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/diamond.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritedFunctionWithDefaultParameters.kt")
|
||||
public void testInheritedFunctionWithDefaultParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/inheritedFunctionWithDefaultParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inline.kt")
|
||||
public void testInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/inline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineProperty.kt")
|
||||
public void testInlineProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/inlineProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt11969.kt")
|
||||
public void testKt11969() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt11969.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243.kt")
|
||||
public void testKt14243() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243_2.kt")
|
||||
public void testKt14243_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243_prop.kt")
|
||||
public void testKt14243_prop() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243_prop.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt40920.kt")
|
||||
public void testKt40920() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt40920.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt42674.kt")
|
||||
public void testKt42674() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt42674.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation.kt")
|
||||
public void testOneImplementation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/oneImplementation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation2.kt")
|
||||
public void testOneImplementation2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/oneImplementation2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateDefaultFromDefaultImpl.kt")
|
||||
public void testPrivateDefaultFromDefaultImpl() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/privateDefaultFromDefaultImpl.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateInDefaultImpls.kt")
|
||||
public void testPrivateInDefaultImpls() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/privateInDefaultImpls.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleCall.kt")
|
||||
public void testSimpleCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/simpleCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleProperty.kt")
|
||||
public void testSimpleProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/simpleProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCall.kt")
|
||||
public void testSuperCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/superCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendFunction.kt")
|
||||
public void testSuspendFunction() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/suspendFunction.kt");
|
||||
@TestMetadata("kt26360.kt")
|
||||
public void testKt26360() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt26360.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -30307,6 +30027,18 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/callStackTrace.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callableReference.kt")
|
||||
public void testCallableReference() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/callableReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("capturedSuperCall.kt")
|
||||
public void testCapturedSuperCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/capturedSuperCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgs.kt")
|
||||
public void testDefaultArgs() throws Exception {
|
||||
@@ -30319,12 +30051,24 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/defaultArgsViaAnonymousObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecatedAnnotation.kt")
|
||||
public void testDeprecatedAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/deprecatedAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecatedDefaultMethod.kt")
|
||||
public void testDeprecatedDefaultMethod() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/deprecatedDefaultMethod.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("diamond.kt")
|
||||
public void testDiamond() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/diamond.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funInterface.kt")
|
||||
public void testFunInterface() throws Exception {
|
||||
@@ -30343,12 +30087,30 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/inheritedJvmDefault.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inline.kt")
|
||||
public void testInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/inline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineProperty.kt")
|
||||
public void testInlineProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/inlineProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceExtension.kt")
|
||||
public void testInterfaceExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/interfaceExtension.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt11969.kt")
|
||||
public void testKt11969() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/kt11969.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243.kt")
|
||||
public void testKt14243() throws Exception {
|
||||
@@ -30361,6 +30123,18 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/kt14243_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243_prop.kt")
|
||||
public void testKt14243_prop() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/kt14243_prop.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt40920.kt")
|
||||
public void testKt40920() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/kt40920.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt42674.kt")
|
||||
public void testKt42674() throws Exception {
|
||||
@@ -30373,6 +30147,18 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/localDelegatedProperties.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation.kt")
|
||||
public void testOneImplementation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/oneImplementation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation2.kt")
|
||||
public void testOneImplementation2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/oneImplementation2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateFunInInterface.kt")
|
||||
public void testPrivateFunInInterface() throws Exception {
|
||||
@@ -30444,112 +30230,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Compatibility {
|
||||
@Test
|
||||
public void testAllFilesPresentInCompatibility() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridge.kt")
|
||||
public void testBridge() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridge2.kt")
|
||||
public void testBridge2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridge3.kt")
|
||||
public void testBridge3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeWithProperties.kt")
|
||||
public void testBridgeWithProperties() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeWithProperties2.kt")
|
||||
public void testBridgeWithProperties2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeWithProperties3.kt")
|
||||
public void testBridgeWithProperties3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgs.kt")
|
||||
public void testDefaultArgs() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/defaultArgs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgsViaAnonymousObject.kt")
|
||||
public void testDefaultArgsViaAnonymousObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/defaultArgsViaAnonymousObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecatedAnnotation.kt")
|
||||
public void testDeprecatedAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/deprecatedAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecatedDefaultMethod.kt")
|
||||
public void testDeprecatedDefaultMethod() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/deprecatedDefaultMethod.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritedFunctionWithDefaultParameters.kt")
|
||||
public void testInheritedFunctionWithDefaultParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/inheritedFunctionWithDefaultParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritedJvmDefault.kt")
|
||||
public void testInheritedJvmDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/inheritedJvmDefault.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceExtension.kt")
|
||||
public void testInterfaceExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/interfaceExtension.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt42674.kt")
|
||||
public void testKt42674() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/kt42674.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyAnnotation.kt")
|
||||
public void testPropertyAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/propertyAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleFunction.kt")
|
||||
public void testSimpleFunction() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/simpleFunction.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/jvm8/defaults/delegationBy")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -30564,18 +30244,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
public void testJavaDefaultMethod() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/javaDefaultMethod.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleProperty.kt")
|
||||
public void testSimpleProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/simpleProperty.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -30671,6 +30339,18 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/bridgeWithProperties3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callableReference.kt")
|
||||
public void testCallableReference() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/callableReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("capturedSuperCall.kt")
|
||||
public void testCapturedSuperCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/capturedSuperCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgs.kt")
|
||||
public void testDefaultArgs() throws Exception {
|
||||
@@ -30683,6 +30363,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/defaultArgsViaAnonymousObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("diamond.kt")
|
||||
public void testDiamond() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/diamond.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funInterface.kt")
|
||||
public void testFunInterface() throws Exception {
|
||||
@@ -30701,12 +30387,30 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/inheritedJvmDefault.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inline.kt")
|
||||
public void testInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/inline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineProperty.kt")
|
||||
public void testInlineProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/inlineProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceExtension.kt")
|
||||
public void testInterfaceExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/interfaceExtension.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt11969.kt")
|
||||
public void testKt11969() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/kt11969.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243.kt")
|
||||
public void testKt14243() throws Exception {
|
||||
@@ -30719,6 +30423,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/kt14243_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243_prop.kt")
|
||||
public void testKt14243_prop() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/kt14243_prop.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt40920.kt")
|
||||
public void testKt40920() throws Exception {
|
||||
@@ -30749,6 +30459,18 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/localDelegatedProperties2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation.kt")
|
||||
public void testOneImplementation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/oneImplementation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation2.kt")
|
||||
public void testOneImplementation2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/oneImplementation2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateFunInInterface.kt")
|
||||
public void testPrivateFunInInterface() throws Exception {
|
||||
@@ -30876,34 +30598,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class NoDelegation {
|
||||
@Test
|
||||
public void testAllFilesPresentInNoDelegation() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noDelegationToDefaultMethodInClass.kt")
|
||||
public void testNoDelegationToDefaultMethodInClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noDelegationToDefaultMethodInInterface.kt")
|
||||
public void testNoDelegationToDefaultMethodInInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noDelegationToDefaultMethodInInterface2.kt")
|
||||
public void testNoDelegationToDefaultMethodInInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface2.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/jvm8/defaults/nonDefaultInheritance")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+3
-3
@@ -395,9 +395,9 @@ public class FirLightTreeBlackBoxModernJdkCodegenTestGenerated extends AbstractF
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertiesOverridesEnableJvmDefault.kt")
|
||||
public void testPropertiesOverridesEnableJvmDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/records/propertiesOverridesEnableJvmDefault.kt");
|
||||
@TestMetadata("propertiesOverridesAllJvmDefault.kt")
|
||||
public void testPropertiesOverridesAllJvmDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/records/propertiesOverridesAllJvmDefault.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+6
-22
@@ -1560,12 +1560,6 @@ public class FirLightTreeBytecodeListingTestGenerated extends AbstractFirLightTr
|
||||
public void testJvmDefaultAll() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers/jvmDefaultAll.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnable.kt")
|
||||
public void testJvmDefaultEnable() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers/jvmDefaultEnable.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -1917,22 +1911,6 @@ public class FirLightTreeBytecodeListingTestGenerated extends AbstractFirLightTr
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/jvm8/defaults/enable")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Enable {
|
||||
@Test
|
||||
public void testAllFilesPresentInEnable() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/jvm8/defaults/enable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceProperty.kt")
|
||||
public void testInterfaceProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/jvm8/defaults/enable/interfaceProperty.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/jvm8/defaults/noDefaultImpl")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -1947,6 +1925,12 @@ public class FirLightTreeBytecodeListingTestGenerated extends AbstractFirLightTr
|
||||
public void testInterfaceProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/jvm8/defaults/noDefaultImpl/interfaceProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateAccessorNaming.kt")
|
||||
public void testPrivateAccessorNaming() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/jvm8/defaults/noDefaultImpl/privateAccessorNaming.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-46
@@ -3916,12 +3916,6 @@ public class FirLightTreeBytecodeTextTestGenerated extends AbstractFirLightTreeB
|
||||
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/interfaceDefaultImplStubs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceJvmDefaultImplStubs.kt")
|
||||
public void testInterfaceJvmDefaultImplStubs() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/interfaceJvmDefaultImplStubs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("isCheckForInlineClass.kt")
|
||||
public void testIsCheckForInlineClass() throws Exception {
|
||||
@@ -4482,46 +4476,6 @@ public class FirLightTreeBytecodeTextTestGenerated extends AbstractFirLightTreeB
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/allCompatibility/simpleProperty.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Compatibility {
|
||||
@Test
|
||||
public void testAllFilesPresentInCompatibility() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgs.kt")
|
||||
public void testDefaultArgs() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/defaultArgs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleDiamond.kt")
|
||||
public void testSimpleDiamond() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleDiamond.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleFunction.kt")
|
||||
public void testSimpleFunction() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleFunctionWithAbstractOverride.kt")
|
||||
public void testSimpleFunctionWithAbstractOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleFunctionWithAbstractOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleProperty.kt")
|
||||
public void testSimpleProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleProperty.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+129
-435
@@ -8063,6 +8063,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callStackTrace.kt")
|
||||
public void testCallStackTrace() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/callStackTrace.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCall.kt")
|
||||
public void testSuperCall() throws Exception {
|
||||
@@ -8075,12 +8081,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallFromInterface2.kt")
|
||||
public void testSuperCallFromInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superPropAccess.kt")
|
||||
public void testSuperPropAccess() throws Exception {
|
||||
@@ -8093,12 +8093,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superPropAccessFromInterface2.kt")
|
||||
public void testSuperPropAccessFromInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -8229,28 +8223,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
public void testNewAndOldSchemes3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("newSchemeWithJvmDefault.kt")
|
||||
public void testNewSchemeWithJvmDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/noDefaultImpls")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class NoDefaultImpls {
|
||||
@Test
|
||||
public void testAllFilesPresentInNoDefaultImpls() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/noDefaultImpls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superPropAccessFromInterface.kt")
|
||||
public void testSuperPropAccessFromInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/noDefaultImpls/superPropAccessFromInterface.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11591,12 +11563,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
public void testDisable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/jvmDefault/kt46007/disable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enable.kt")
|
||||
public void testEnable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/jvmDefault/kt46007/enable.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24745,18 +24711,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/all-compatibilityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("compatibility.kt")
|
||||
public void testCompatibility() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/compatibility.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("compatibilityGeneric.kt")
|
||||
public void testCompatibilityGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/compatibilityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("default.kt")
|
||||
public void testDefault() throws Exception {
|
||||
@@ -24803,18 +24757,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/all-compatibilityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("compatibility.kt")
|
||||
public void testCompatibility() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/compatibility.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("compatibilityGeneric.kt")
|
||||
public void testCompatibilityGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/compatibilityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("default.kt")
|
||||
public void testDefault() throws Exception {
|
||||
@@ -25822,42 +25764,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultAllPropertyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnable.kt")
|
||||
public void testJvmDefaultEnable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnable.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnableGeneric.kt")
|
||||
public void testJvmDefaultEnableGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnablePrimaryProperty.kt")
|
||||
public void testJvmDefaultEnablePrimaryProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnablePrimaryProperty.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnablePrimaryPropertyGeneric.kt")
|
||||
public void testJvmDefaultEnablePrimaryPropertyGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnablePrimaryPropertyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnableProperty.kt")
|
||||
public void testJvmDefaultEnableProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnableProperty.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnablePropertyGeneric.kt")
|
||||
public void testJvmDefaultEnablePropertyGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultEnablePropertyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultGeneric.kt")
|
||||
public void testJvmDefaultGeneric() throws Exception {
|
||||
@@ -30005,71 +29911,11 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
@TestMetadata("compiler/testData/codegen/box/jvm8/defaults")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Defaults {
|
||||
@Test
|
||||
@TestMetadata("26360.kt")
|
||||
public void test26360() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/26360.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("accessor.kt")
|
||||
public void testAccessor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/accessor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("accessorFromCompanion.kt")
|
||||
public void testAccessorFromCompanion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/accessorFromCompanion.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("accessorsFromDefaultImpls.kt")
|
||||
public void testAccessorsFromDefaultImpls() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/accessorsFromDefaultImpls.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInDefaults() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeInClass.kt")
|
||||
public void testBridgeInClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeInInterface.kt")
|
||||
public void testBridgeInInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeInInterface2.kt")
|
||||
public void testBridgeInInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterface2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeInInterfaceWithProperties.kt")
|
||||
public void testBridgeInInterfaceWithProperties() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterfaceWithProperties.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeInInterfaceWithProperties2.kt")
|
||||
public void testBridgeInInterfaceWithProperties2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeInInterfaceWithProperties2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeWithJava.kt")
|
||||
public void testBridgeWithJava() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/bridgeWithJava.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("builtInsInherited.kt")
|
||||
public void testBuiltInsInherited() throws Exception {
|
||||
@@ -30077,135 +29923,9 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callableReference.kt")
|
||||
public void testCallableReference() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/callableReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("capturedSuperCall.kt")
|
||||
public void testCapturedSuperCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/capturedSuperCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgs.kt")
|
||||
public void testDefaultArgs() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/defaultArgs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgsViaAnonymousObject.kt")
|
||||
public void testDefaultArgsViaAnonymousObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/defaultArgsViaAnonymousObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("diamond.kt")
|
||||
public void testDiamond() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/diamond.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritedFunctionWithDefaultParameters.kt")
|
||||
public void testInheritedFunctionWithDefaultParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/inheritedFunctionWithDefaultParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inline.kt")
|
||||
public void testInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/inline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineProperty.kt")
|
||||
public void testInlineProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/inlineProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt11969.kt")
|
||||
public void testKt11969() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt11969.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243.kt")
|
||||
public void testKt14243() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243_2.kt")
|
||||
public void testKt14243_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243_prop.kt")
|
||||
public void testKt14243_prop() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt14243_prop.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt40920.kt")
|
||||
public void testKt40920() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt40920.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt42674.kt")
|
||||
public void testKt42674() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt42674.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation.kt")
|
||||
public void testOneImplementation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/oneImplementation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation2.kt")
|
||||
public void testOneImplementation2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/oneImplementation2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateDefaultFromDefaultImpl.kt")
|
||||
public void testPrivateDefaultFromDefaultImpl() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/privateDefaultFromDefaultImpl.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateInDefaultImpls.kt")
|
||||
public void testPrivateInDefaultImpls() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/privateInDefaultImpls.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleCall.kt")
|
||||
public void testSimpleCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/simpleCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleProperty.kt")
|
||||
public void testSimpleProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/simpleProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCall.kt")
|
||||
public void testSuperCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/superCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendFunction.kt")
|
||||
public void testSuspendFunction() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/suspendFunction.kt");
|
||||
@TestMetadata("kt26360.kt")
|
||||
public void testKt26360() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/kt26360.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -30307,6 +30027,18 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/callStackTrace.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callableReference.kt")
|
||||
public void testCallableReference() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/callableReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("capturedSuperCall.kt")
|
||||
public void testCapturedSuperCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/capturedSuperCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgs.kt")
|
||||
public void testDefaultArgs() throws Exception {
|
||||
@@ -30319,12 +30051,24 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/defaultArgsViaAnonymousObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecatedAnnotation.kt")
|
||||
public void testDeprecatedAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/deprecatedAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecatedDefaultMethod.kt")
|
||||
public void testDeprecatedDefaultMethod() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/deprecatedDefaultMethod.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("diamond.kt")
|
||||
public void testDiamond() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/diamond.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funInterface.kt")
|
||||
public void testFunInterface() throws Exception {
|
||||
@@ -30343,12 +30087,30 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/inheritedJvmDefault.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inline.kt")
|
||||
public void testInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/inline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineProperty.kt")
|
||||
public void testInlineProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/inlineProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceExtension.kt")
|
||||
public void testInterfaceExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/interfaceExtension.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt11969.kt")
|
||||
public void testKt11969() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/kt11969.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243.kt")
|
||||
public void testKt14243() throws Exception {
|
||||
@@ -30361,6 +30123,18 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/kt14243_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243_prop.kt")
|
||||
public void testKt14243_prop() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/kt14243_prop.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt40920.kt")
|
||||
public void testKt40920() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/kt40920.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt42674.kt")
|
||||
public void testKt42674() throws Exception {
|
||||
@@ -30373,6 +30147,18 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/localDelegatedProperties.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation.kt")
|
||||
public void testOneImplementation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/oneImplementation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation2.kt")
|
||||
public void testOneImplementation2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/oneImplementation2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateFunInInterface.kt")
|
||||
public void testPrivateFunInInterface() throws Exception {
|
||||
@@ -30444,112 +30230,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Compatibility {
|
||||
@Test
|
||||
public void testAllFilesPresentInCompatibility() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridge.kt")
|
||||
public void testBridge() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridge2.kt")
|
||||
public void testBridge2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridge3.kt")
|
||||
public void testBridge3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridge3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeWithProperties.kt")
|
||||
public void testBridgeWithProperties() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeWithProperties2.kt")
|
||||
public void testBridgeWithProperties2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeWithProperties3.kt")
|
||||
public void testBridgeWithProperties3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/bridgeWithProperties3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgs.kt")
|
||||
public void testDefaultArgs() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/defaultArgs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgsViaAnonymousObject.kt")
|
||||
public void testDefaultArgsViaAnonymousObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/defaultArgsViaAnonymousObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecatedAnnotation.kt")
|
||||
public void testDeprecatedAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/deprecatedAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecatedDefaultMethod.kt")
|
||||
public void testDeprecatedDefaultMethod() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/deprecatedDefaultMethod.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritedFunctionWithDefaultParameters.kt")
|
||||
public void testInheritedFunctionWithDefaultParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/inheritedFunctionWithDefaultParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritedJvmDefault.kt")
|
||||
public void testInheritedJvmDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/inheritedJvmDefault.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceExtension.kt")
|
||||
public void testInterfaceExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/interfaceExtension.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt42674.kt")
|
||||
public void testKt42674() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/kt42674.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyAnnotation.kt")
|
||||
public void testPropertyAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/propertyAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleFunction.kt")
|
||||
public void testSimpleFunction() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/compatibility/simpleFunction.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/jvm8/defaults/delegationBy")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -30564,18 +30244,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
public void testJavaDefaultMethod() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/javaDefaultMethod.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleProperty.kt")
|
||||
public void testSimpleProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/delegationBy/simpleProperty.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -30671,6 +30339,18 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/bridgeWithProperties3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callableReference.kt")
|
||||
public void testCallableReference() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/callableReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("capturedSuperCall.kt")
|
||||
public void testCapturedSuperCall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/capturedSuperCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgs.kt")
|
||||
public void testDefaultArgs() throws Exception {
|
||||
@@ -30683,6 +30363,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/defaultArgsViaAnonymousObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("diamond.kt")
|
||||
public void testDiamond() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/diamond.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funInterface.kt")
|
||||
public void testFunInterface() throws Exception {
|
||||
@@ -30701,12 +30387,30 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/inheritedJvmDefault.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inline.kt")
|
||||
public void testInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/inline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineProperty.kt")
|
||||
public void testInlineProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/inlineProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceExtension.kt")
|
||||
public void testInterfaceExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/interfaceExtension.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt11969.kt")
|
||||
public void testKt11969() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/kt11969.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243.kt")
|
||||
public void testKt14243() throws Exception {
|
||||
@@ -30719,6 +30423,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/kt14243_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt14243_prop.kt")
|
||||
public void testKt14243_prop() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/kt14243_prop.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt40920.kt")
|
||||
public void testKt40920() throws Exception {
|
||||
@@ -30749,6 +30459,18 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/localDelegatedProperties2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation.kt")
|
||||
public void testOneImplementation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/oneImplementation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneImplementation2.kt")
|
||||
public void testOneImplementation2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/oneImplementation2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateFunInInterface.kt")
|
||||
public void testPrivateFunInInterface() throws Exception {
|
||||
@@ -30876,34 +30598,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class NoDelegation {
|
||||
@Test
|
||||
public void testAllFilesPresentInNoDelegation() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noDelegationToDefaultMethodInClass.kt")
|
||||
public void testNoDelegationToDefaultMethodInClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noDelegationToDefaultMethodInInterface.kt")
|
||||
public void testNoDelegationToDefaultMethodInInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noDelegationToDefaultMethodInInterface2.kt")
|
||||
public void testNoDelegationToDefaultMethodInInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface2.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/jvm8/defaults/nonDefaultInheritance")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+3
-3
@@ -395,9 +395,9 @@ public class FirPsiBlackBoxModernJdkCodegenTestGenerated extends AbstractFirPsiB
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertiesOverridesEnableJvmDefault.kt")
|
||||
public void testPropertiesOverridesEnableJvmDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/records/propertiesOverridesEnableJvmDefault.kt");
|
||||
@TestMetadata("propertiesOverridesAllJvmDefault.kt")
|
||||
public void testPropertiesOverridesAllJvmDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxModernJdk/testsWithJava17/records/propertiesOverridesAllJvmDefault.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+6
-22
@@ -1560,12 +1560,6 @@ public class FirPsiBytecodeListingTestGenerated extends AbstractFirPsiBytecodeLi
|
||||
public void testJvmDefaultAll() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers/jvmDefaultAll.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnable.kt")
|
||||
public void testJvmDefaultEnable() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/defaultInterfaceMembers/jvmDefaultEnable.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -1917,22 +1911,6 @@ public class FirPsiBytecodeListingTestGenerated extends AbstractFirPsiBytecodeLi
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/jvm8/defaults/enable")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Enable {
|
||||
@Test
|
||||
public void testAllFilesPresentInEnable() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/jvm8/defaults/enable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceProperty.kt")
|
||||
public void testInterfaceProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/jvm8/defaults/enable/interfaceProperty.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/jvm8/defaults/noDefaultImpl")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -1947,6 +1925,12 @@ public class FirPsiBytecodeListingTestGenerated extends AbstractFirPsiBytecodeLi
|
||||
public void testInterfaceProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/jvm8/defaults/noDefaultImpl/interfaceProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateAccessorNaming.kt")
|
||||
public void testPrivateAccessorNaming() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/jvm8/defaults/noDefaultImpl/privateAccessorNaming.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-46
@@ -3916,12 +3916,6 @@ public class FirPsiBytecodeTextTestGenerated extends AbstractFirPsiBytecodeTextT
|
||||
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/interfaceDefaultImplStubs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceJvmDefaultImplStubs.kt")
|
||||
public void testInterfaceJvmDefaultImplStubs() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/interfaceJvmDefaultImplStubs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("isCheckForInlineClass.kt")
|
||||
public void testIsCheckForInlineClass() throws Exception {
|
||||
@@ -4482,46 +4476,6 @@ public class FirPsiBytecodeTextTestGenerated extends AbstractFirPsiBytecodeTextT
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/allCompatibility/simpleProperty.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Compatibility {
|
||||
@Test
|
||||
public void testAllFilesPresentInCompatibility() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultArgs.kt")
|
||||
public void testDefaultArgs() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/defaultArgs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleDiamond.kt")
|
||||
public void testSimpleDiamond() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleDiamond.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleFunction.kt")
|
||||
public void testSimpleFunction() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleFunctionWithAbstractOverride.kt")
|
||||
public void testSimpleFunctionWithAbstractOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleFunctionWithAbstractOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleProperty.kt")
|
||||
public void testSimpleProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleProperty.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
$TESTDATA_DIR$/jvmDefaultAll.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xjvm-default=compatibility
|
||||
@@ -1,4 +0,0 @@
|
||||
interface Foo {
|
||||
@JvmDefault
|
||||
fun test() {}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
warning: '-Xjvm-default=compatibility' is deprecated, please use '-Xjvm-default=all|all-compatibility'
|
||||
OK
|
||||
@@ -1,4 +0,0 @@
|
||||
$TESTDATA_DIR$/jvmDefaultAll.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xjvm-default=enable
|
||||
@@ -1,4 +0,0 @@
|
||||
interface Foo {
|
||||
@JvmDefault
|
||||
fun test() {}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
warning: '-Xjvm-default=enable' is deprecated, please use '-Xjvm-default=all|all-compatibility'
|
||||
OK
|
||||
+1
-2
@@ -1,4 +1,4 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// SKIP_JDK6
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
@@ -14,7 +14,6 @@ class B : A<String, String>, java.util.AbstractMap<String, String>() {
|
||||
}
|
||||
|
||||
interface C<K, V> : MutableMap<K, V> {
|
||||
@JvmDefault
|
||||
override fun remove(key: K, value: V) = true
|
||||
}
|
||||
|
||||
|
||||
+3
-16
@@ -6,24 +6,11 @@
|
||||
// MODULE: lib
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test(): String {
|
||||
return "O"
|
||||
}
|
||||
|
||||
fun delegatedTest(): String {
|
||||
return "fail"
|
||||
}
|
||||
fun test(): String = "Fail"
|
||||
}
|
||||
|
||||
class Delegate : Test {
|
||||
override fun test(): String {
|
||||
return "Fail"
|
||||
}
|
||||
|
||||
override fun delegatedTest(): String {
|
||||
return "K"
|
||||
}
|
||||
override fun test(): String = "OK"
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
@@ -32,5 +19,5 @@ class TestClass(val foo: Test) : Test by foo
|
||||
|
||||
fun box(): String {
|
||||
val testClass = TestClass(Delegate())
|
||||
return testClass.test() + testClass.delegatedTest()
|
||||
return testClass.test()
|
||||
}
|
||||
|
||||
+3
-13
@@ -6,21 +6,11 @@
|
||||
// MODULE: lib
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
val test: String
|
||||
get() = "O"
|
||||
|
||||
val testDelegated: String
|
||||
get() = "fail"
|
||||
|
||||
val test: String get() = "Fail"
|
||||
}
|
||||
|
||||
class Delegate : Test {
|
||||
override val test: String
|
||||
get() = "fail"
|
||||
|
||||
override val testDelegated: String
|
||||
get() = "K"
|
||||
override val test: String get() = "OK"
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
@@ -29,5 +19,5 @@ class TestClass(val foo: Test) : Test by foo
|
||||
|
||||
fun box(): String {
|
||||
val testClass = TestClass(Delegate())
|
||||
return testClass.test + testClass.testDelegated
|
||||
return testClass.test
|
||||
}
|
||||
|
||||
+5
-8
@@ -1,11 +1,10 @@
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// FULL_JDK
|
||||
// WITH_STDLIB
|
||||
// JVM_TARGET: 1.8
|
||||
// MODULE: lib
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// FILE: 1.kt
|
||||
interface KInterface {
|
||||
@JvmDefault
|
||||
fun call(): List<String> {
|
||||
return Thread.currentThread().getStackTrace().map { it.className + "." + it.methodName }
|
||||
}
|
||||
@@ -14,10 +13,9 @@ interface KInterface {
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// FILE: main.kt
|
||||
interface KInterface2 : KInterface {
|
||||
override fun superCall() = super.superCall()
|
||||
|
||||
}
|
||||
|
||||
class Foo: KInterface2 {
|
||||
@@ -30,10 +28,9 @@ fun box(): String {
|
||||
if (result[2] != "MainKt.box") return "fail 2: ${result[2]}"
|
||||
|
||||
result = Foo().superCall2()
|
||||
if (result[1] != "KInterface\$DefaultImpls.superCall") return "fail 1: ${result[1]}"
|
||||
if (result[2] != "KInterface2.superCall") return "fail 2: ${result[2]}"
|
||||
if (result[3] != "Foo.superCall2") return "fail 3: ${result[3]}"
|
||||
if (result[4] != "MainKt.box") return "fail 4: ${result[4]}"
|
||||
if (result[1] != "KInterface.superCall") return "fail 1: ${result[1]}"
|
||||
if (result[2] != "Foo.superCall2") return "fail 2: ${result[2]}"
|
||||
if (result[3] != "MainKt.box") return "fail 3: ${result[3]}"
|
||||
|
||||
|
||||
return "OK"
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// MODULE: lib
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
val prop: String
|
||||
get() = "OK"
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: 2.kt
|
||||
interface Test2 : Test {
|
||||
override val prop: String
|
||||
get() = super.prop
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return object : Test2 {}.prop
|
||||
}
|
||||
+1
-2
@@ -1,10 +1,9 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// MODULE: lib
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Vendored
+1
-3
@@ -1,10 +1,9 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// MODULE: lib
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test(): String {
|
||||
return "OK"
|
||||
}
|
||||
@@ -14,7 +13,6 @@ interface Test {
|
||||
// FILE: 2.kt
|
||||
|
||||
interface Test2 : Test {
|
||||
@JvmDefault
|
||||
override fun test(): String {
|
||||
return super.test()
|
||||
}
|
||||
|
||||
Vendored
-29
@@ -1,29 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// MODULE: lib
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
fun defaultImplTrigger(): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: 2.kt
|
||||
|
||||
interface Test2 : Test {
|
||||
@JvmDefault
|
||||
override fun test(): String {
|
||||
return super.test()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return object : Test2 {}.test()
|
||||
}
|
||||
+1
-2
@@ -1,10 +1,9 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// MODULE: lib
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
val prop: String
|
||||
get() = "OK"
|
||||
}
|
||||
|
||||
+1
-3
@@ -1,10 +1,9 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// MODULE: lib
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
val prop: String
|
||||
get() = "OK"
|
||||
}
|
||||
@@ -12,7 +11,6 @@ interface Test {
|
||||
// MODULE: main(lib)
|
||||
// FILE: 2.kt
|
||||
interface Test2 : Test {
|
||||
@JvmDefault
|
||||
override val prop: String
|
||||
get() = super.prop
|
||||
}
|
||||
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// MODULE: lib
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
val prop: String
|
||||
get() = "OK"
|
||||
|
||||
val defaultImplTrigger: String
|
||||
get() = "OK"
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: 2.kt
|
||||
interface Test2 : Test {
|
||||
@JvmDefault
|
||||
override val prop: String
|
||||
get() = super.prop
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return object : Test2 {}.prop
|
||||
}
|
||||
Vendored
+2
-3
@@ -1,5 +1,5 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// MODULE: lib
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
fun test(): String {
|
||||
@@ -8,11 +8,11 @@ interface Test {
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: 2.kt
|
||||
interface Test2 : Test {
|
||||
@JvmDefault
|
||||
override fun test(): String {
|
||||
return super.test()
|
||||
}
|
||||
@@ -24,7 +24,6 @@ interface Test3 : Test {
|
||||
|
||||
|
||||
interface Test4 : Test2, Test3 {
|
||||
@JvmDefault
|
||||
override fun test(): String {
|
||||
return super.test()
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -1,5 +1,5 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// MODULE: lib
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
fun test(): String {
|
||||
@@ -8,6 +8,7 @@ interface Test {
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: 2.kt
|
||||
@@ -18,7 +19,6 @@ open class TestClass : Test {
|
||||
}
|
||||
|
||||
interface Test2 : Test {
|
||||
@JvmDefault
|
||||
override fun test(): String
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -1,5 +1,5 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// MODULE: lib
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
fun test(): String {
|
||||
@@ -8,6 +8,7 @@ interface Test {
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: 2.kt
|
||||
@@ -16,7 +17,6 @@ abstract class TestClass : Test {
|
||||
}
|
||||
|
||||
interface Test2 : Test {
|
||||
@JvmDefault
|
||||
override fun test(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// MODULE: lib
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
// FILE: 1.kt
|
||||
interface Test {
|
||||
fun test(): String {
|
||||
@@ -8,11 +8,11 @@ interface Test {
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: 2.kt
|
||||
interface Test2 : Test {
|
||||
@JvmDefault
|
||||
override fun test(): String {
|
||||
return super.test()
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// MODULE: lib
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
// FILE: 1.kt
|
||||
|
||||
interface Test {
|
||||
@@ -9,11 +9,11 @@ interface Test {
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: 2.kt
|
||||
interface Test2 : Test {
|
||||
@JvmDefault
|
||||
override fun test(): String {
|
||||
return super.test()
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// MODULE: lib
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
// FILE: 1.kt
|
||||
|
||||
interface Test {
|
||||
@@ -8,11 +8,11 @@ interface Test {
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: 2.kt
|
||||
interface Test2 : Test {
|
||||
@JvmDefault
|
||||
override val test: String
|
||||
get() = super.test
|
||||
}
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
// WITH_STDLIB
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
import kotlin.coroutines.*
|
||||
|
||||
class A : BlockingDoubleChain
|
||||
|
||||
interface BlockingDoubleChain : BlockingBufferChain
|
||||
|
||||
interface BlockingBufferChain {
|
||||
suspend fun nextBuffer(): String = "OK"
|
||||
}
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(Continuation(EmptyCoroutineContext) {
|
||||
it.getOrThrow()
|
||||
})
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = A().nextBuffer()
|
||||
}
|
||||
return res
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
interface Path {
|
||||
fun dispatch(s: String = "K") = "dispatch$s"
|
||||
fun Int.extension(s: String = "K") = "${this}extension$s"
|
||||
}
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class RealPath(val x: Int) : Path
|
||||
|
||||
fun box(): String {
|
||||
val rp = RealPath(1)
|
||||
val res = "${rp.dispatch()};${rp.dispatch("KK")};" +
|
||||
with(rp) {
|
||||
"${1.extension()};${2.extension("KK")}"
|
||||
}
|
||||
if (res != "dispatchK;dispatchKK;1extensionK;2extensionKK") return res
|
||||
return "OK"
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
interface Path {
|
||||
fun dispatch(s: String = "K") = "dispatch$s"
|
||||
fun Int.extension(s: String = "K") = "${this}extension$s"
|
||||
}
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class RealPath<T: Int>(val x: T) : Path
|
||||
|
||||
fun box(): String {
|
||||
val rp = RealPath(1)
|
||||
val res = "${rp.dispatch()};${rp.dispatch("KK")};" +
|
||||
with(rp) {
|
||||
"${1.extension()};${2.extension("KK")}"
|
||||
}
|
||||
if (res != "dispatchK;dispatchKK;1extensionK;2extensionKK") return res
|
||||
return "OK"
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
interface Path {
|
||||
fun dispatch(maxDepth: Int = 42)
|
||||
fun Int.extension(maxDepth: Int = 42)
|
||||
}
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class RealPath(val x: Int) : Path {
|
||||
override fun dispatch(maxDepth: Int) = Unit
|
||||
|
||||
fun childrenDispatch(recursively: Boolean): Unit =
|
||||
if (recursively) dispatch() else dispatch()
|
||||
|
||||
override fun Int.extension(maxDepth: Int) = Unit
|
||||
|
||||
fun Int.childrenExtension(recursively: Boolean): Unit =
|
||||
if (recursively) extension() else extension()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
RealPath(1)
|
||||
return "OK"
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
interface Path {
|
||||
fun dispatch(maxDepth: Int = 42)
|
||||
fun Int.extension(maxDepth: Int = 42)
|
||||
}
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class RealPath<T: Int>(val x: T) : Path {
|
||||
override fun dispatch(maxDepth: Int) = Unit
|
||||
|
||||
fun childrenDispatch(recursively: Boolean): Unit =
|
||||
if (recursively) dispatch() else dispatch()
|
||||
|
||||
override fun Int.extension(maxDepth: Int) = Unit
|
||||
|
||||
fun Int.childrenExtension(recursively: Boolean): Unit =
|
||||
if (recursively) extension() else extension()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
RealPath(1)
|
||||
return "OK"
|
||||
}
|
||||
Vendored
-50
@@ -1,50 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_STDLIB
|
||||
// JVM_TARGET: 1.8
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
// FILE: jvmDefaultEnable.kt
|
||||
|
||||
interface IFooBar {
|
||||
@JvmDefault fun foo() = "O"
|
||||
@JvmDefault fun bar() = "Failed"
|
||||
}
|
||||
|
||||
interface IFooBar2 : IFooBar
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Test1(val k: String): IFooBar {
|
||||
override fun bar(): String = k
|
||||
}
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value 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"
|
||||
}
|
||||
Vendored
-50
@@ -1,50 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_STDLIB
|
||||
// JVM_TARGET: 1.8
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
// FILE: jvmDefaultEnable.kt
|
||||
|
||||
interface IFooBar {
|
||||
@JvmDefault fun foo() = "O"
|
||||
@JvmDefault fun bar() = "Failed"
|
||||
}
|
||||
|
||||
interface IFooBar2 : IFooBar
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Test1<T: String>(val k: T): IFooBar {
|
||||
override fun bar(): String = k
|
||||
}
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Test2<T: String>(val k: T): 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"
|
||||
}
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_STDLIB
|
||||
// JVM_TARGET: 1.8
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
// FILE: jvmDefaultEnable.kt
|
||||
|
||||
interface IFooBar {
|
||||
@JvmDefault val foo get() = "O"
|
||||
@JvmDefault val bar get() = "Failed"
|
||||
}
|
||||
|
||||
interface IFooBar2 : IFooBar
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Test1(override val bar: String): IFooBar
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value 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"
|
||||
}
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_STDLIB
|
||||
// JVM_TARGET: 1.8
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
// FILE: jvmDefaultEnable.kt
|
||||
|
||||
interface IFooBar {
|
||||
@JvmDefault val foo get() = "O"
|
||||
@JvmDefault val bar get() = "Failed"
|
||||
}
|
||||
|
||||
interface IFooBar2 : IFooBar
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Test1<T: String>(override val bar: T): IFooBar
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Test2<T: String>(override val bar: T): 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"
|
||||
}
|
||||
Vendored
-52
@@ -1,52 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_STDLIB
|
||||
// JVM_TARGET: 1.8
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
// FILE: jvmDefaultEnable.kt
|
||||
|
||||
interface IFooBar {
|
||||
@JvmDefault val foo get() = "O"
|
||||
@JvmDefault val bar get() = "Failed"
|
||||
}
|
||||
|
||||
interface IFooBar2 : IFooBar
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Test1(val k: String): IFooBar {
|
||||
override val bar: String
|
||||
get() = k
|
||||
}
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value 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"
|
||||
}
|
||||
-52
@@ -1,52 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_STDLIB
|
||||
// JVM_TARGET: 1.8
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
// FILE: jvmDefaultEnable.kt
|
||||
|
||||
interface IFooBar {
|
||||
@JvmDefault val foo get() = "O"
|
||||
@JvmDefault val bar get() = "Failed"
|
||||
}
|
||||
|
||||
interface IFooBar2 : IFooBar
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Test1<T: String>(val k: T): IFooBar {
|
||||
override val bar: String
|
||||
get() = k
|
||||
}
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Test2<T: String>(val k: T): 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"
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
var storage = "fail"
|
||||
|
||||
interface Test {
|
||||
|
||||
@JvmDefault
|
||||
private var foo: String
|
||||
get() = storage
|
||||
set(value) {
|
||||
storage = value
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
private fun bar(): String {
|
||||
return "K"
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
fun call(): String {
|
||||
return {
|
||||
foo = "O"
|
||||
foo + bar()
|
||||
}.let { it() }
|
||||
}
|
||||
}
|
||||
|
||||
class TestClass : Test {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return TestClass().call()
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
private val foo: String
|
||||
get() = "O"
|
||||
|
||||
@JvmDefault
|
||||
private fun bar(): String {
|
||||
return "K"
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun call(test: Test): String {
|
||||
return test.foo + test.bar()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class TestClass : Test
|
||||
|
||||
fun box(): String {
|
||||
return Test.call(TestClass())
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
private val foo: String
|
||||
get() = "O"
|
||||
|
||||
@JvmDefault
|
||||
private fun bar(): String {
|
||||
return "K"
|
||||
}
|
||||
|
||||
fun call(): String {
|
||||
return { foo + bar() }.let { it() }
|
||||
}
|
||||
}
|
||||
|
||||
class TestClass : Test {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return TestClass().call()
|
||||
}
|
||||
+1
-4
@@ -1,13 +1,10 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun foo(): String = "O"
|
||||
|
||||
@JvmDefault
|
||||
val bar: String
|
||||
get() = "K"
|
||||
|
||||
+1
-2
@@ -1,10 +1,9 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface IBase {
|
||||
@JvmDefault
|
||||
fun bar() = "OK"
|
||||
}
|
||||
|
||||
+3
-16
@@ -4,29 +4,16 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test(): String {
|
||||
return "O"
|
||||
}
|
||||
|
||||
fun delegatedTest(): String {
|
||||
return "fail"
|
||||
}
|
||||
fun test(): String = "Fail"
|
||||
}
|
||||
|
||||
class Delegate : Test {
|
||||
override fun test(): String {
|
||||
return "Fail"
|
||||
}
|
||||
|
||||
override fun delegatedTest(): String {
|
||||
return "K"
|
||||
}
|
||||
override fun test(): String = "OK"
|
||||
}
|
||||
|
||||
class TestClass(val foo: Test) : Test by foo
|
||||
|
||||
fun box(): String {
|
||||
val testClass = TestClass(Delegate())
|
||||
return testClass.test() + testClass.delegatedTest()
|
||||
return testClass.test()
|
||||
}
|
||||
|
||||
Vendored
+3
-13
@@ -4,26 +4,16 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
val test: String
|
||||
get() = "O"
|
||||
|
||||
val testDelegated: String
|
||||
get() = "fail"
|
||||
|
||||
val test: String get() = "Fail"
|
||||
}
|
||||
|
||||
class Delegate : Test {
|
||||
override val test: String
|
||||
get() = "fail"
|
||||
|
||||
override val testDelegated: String
|
||||
get() = "K"
|
||||
override val test: String get() = "OK"
|
||||
}
|
||||
|
||||
class TestClass(val foo: Test) : Test by foo
|
||||
|
||||
fun box(): String {
|
||||
val testClass = TestClass(Delegate())
|
||||
return testClass.test + testClass.testDelegated
|
||||
return testClass.test
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,11 +1,10 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FULL_JDK
|
||||
// WITH_STDLIB
|
||||
|
||||
interface IFoo {
|
||||
@JvmDefault
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
+1
-3
@@ -1,4 +1,4 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
// JVM_TARGET: 1.8
|
||||
@@ -6,7 +6,6 @@
|
||||
// FULL_JDK
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test(): String {
|
||||
return "Test"
|
||||
}
|
||||
@@ -18,7 +17,6 @@ open class TestClass : Test {
|
||||
|
||||
|
||||
interface Test2 : Test {
|
||||
@JvmDefault
|
||||
override fun test(): String {
|
||||
return "Test2"
|
||||
}
|
||||
+4
-10
@@ -1,21 +1,15 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// IGNORE_INLINER: IR
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test(): String {
|
||||
return inlineFun { "O" }
|
||||
return inlineFun { "OK" }
|
||||
}
|
||||
|
||||
fun testDefaultImpls(): String {
|
||||
return inlineFun { "K" }
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
private inline fun inlineFun(s: () -> String) = s()
|
||||
|
||||
}
|
||||
|
||||
class TestClass : Test {
|
||||
@@ -24,5 +18,5 @@ class TestClass : Test {
|
||||
|
||||
fun box(): String {
|
||||
val foo = TestClass()
|
||||
return foo.test() + foo.testDefaultImpls()
|
||||
return foo.test()
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// IGNORE_INLINER: IR
|
||||
|
||||
interface Test {
|
||||
fun test(): String {
|
||||
return inlineProp
|
||||
}
|
||||
|
||||
private inline val inlineProp: String
|
||||
get() = "OK"
|
||||
|
||||
}
|
||||
|
||||
class TestClass : Test {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String =
|
||||
TestClass().test()
|
||||
+1
-7
@@ -1,24 +1,18 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Z {
|
||||
|
||||
@JvmDefault
|
||||
private fun privateFun() = { "OK" }
|
||||
|
||||
@JvmDefault
|
||||
fun callPrivateFun() = privateFun()
|
||||
|
||||
@JvmDefault
|
||||
fun publicFun() = { "OK" }
|
||||
|
||||
@JvmDefault
|
||||
fun funWithDefaultArgs(s: () -> Unit = {}): () -> Unit
|
||||
|
||||
@JvmDefault
|
||||
val property: () -> Unit
|
||||
get() = {}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Z<T> {
|
||||
val value: T
|
||||
|
||||
val z: T
|
||||
get() = value
|
||||
}
|
||||
|
||||
@JvmDefaultWithoutCompatibility
|
||||
open class ZImpl : Z<String> {
|
||||
override val value: String
|
||||
get() = "OK"
|
||||
}
|
||||
|
||||
open class ZImpl2 : ZImpl() {
|
||||
override val z: String
|
||||
get() = super.z
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return ZImpl2().value
|
||||
}
|
||||
+1
-2
@@ -1,4 +1,4 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
@@ -13,7 +13,6 @@ public interface JBase extends Base {
|
||||
// FILE: main.kt
|
||||
|
||||
interface Base {
|
||||
@JvmDefault
|
||||
fun test(): String = "Base"
|
||||
}
|
||||
|
||||
+1
-3
@@ -1,15 +1,13 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface KCallable {
|
||||
@JvmDefault
|
||||
val returnType: String
|
||||
}
|
||||
|
||||
interface KCallableImpl : KCallable {
|
||||
@JvmDefault
|
||||
override val returnType: String
|
||||
get() = "OK"
|
||||
}
|
||||
+1
-3
@@ -1,15 +1,13 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface KCallable {
|
||||
@JvmDefault
|
||||
val returnType: String
|
||||
}
|
||||
|
||||
interface KCallableImpl : KCallable {
|
||||
@JvmDefault
|
||||
override val returnType: String
|
||||
get() = "OK"
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test<T> {
|
||||
@JvmDefault
|
||||
fun test(p: T): T {
|
||||
return p
|
||||
}
|
||||
}
|
||||
|
||||
class TestClass : Test<String> {
|
||||
override fun test(p: String): String {
|
||||
return p + "K"
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> execute(t: Test<T>, p: T): T {
|
||||
return t.test(p)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return execute(TestClass(), "O")
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test<T> {
|
||||
@JvmDefault
|
||||
fun test(p: T): T {
|
||||
return p
|
||||
}
|
||||
}
|
||||
|
||||
interface Test2: Test<String> {
|
||||
@JvmDefault
|
||||
override fun test(p: String): String {
|
||||
return p + "K"
|
||||
}
|
||||
}
|
||||
|
||||
class TestClass : Test2 {
|
||||
}
|
||||
|
||||
fun <T> execute(t: Test<T>, p: T): T {
|
||||
return t.test(p)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return execute(TestClass(), "O")
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
|
||||
interface Test<T> {
|
||||
@JvmDefault
|
||||
fun test(p: T): T {
|
||||
return null!!
|
||||
}
|
||||
|
||||
fun foo(p: T): T {
|
||||
return null!!
|
||||
}
|
||||
}
|
||||
|
||||
interface Test2: Test<String> {
|
||||
@JvmDefault
|
||||
override fun test(p: String): String {
|
||||
return p
|
||||
}
|
||||
|
||||
override fun foo(p: String): String {
|
||||
return p
|
||||
}
|
||||
}
|
||||
|
||||
class TestClass : Test2
|
||||
|
||||
fun box(): String {
|
||||
checkNoMethod(Test2::class.java, "foo", Any::class.java)
|
||||
checkMethodExists(Test2::class.java, "test", Any::class.java)
|
||||
|
||||
checkNoMethod(TestClass::class.java, "test", Any::class.java)
|
||||
checkMethodExists(TestClass::class.java, "foo", String::class.java)
|
||||
checkMethodExists(TestClass::class.java, "foo", Any::class.java)
|
||||
|
||||
|
||||
val test2DefaultImpls = java.lang.Class.forName("Test2\$DefaultImpls")
|
||||
checkNoMethod(test2DefaultImpls, "test", Any::class.java)
|
||||
checkNoMethod(test2DefaultImpls, "test", String::class.java)
|
||||
checkMethodExists(test2DefaultImpls, "foo", Test2::class.java, String::class.java)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
fun checkNoMethod(clazz: Class<*>, name: String, vararg parameterTypes: Class<*>) {
|
||||
try {
|
||||
clazz.getDeclaredMethod(name, *parameterTypes)
|
||||
}
|
||||
catch (e: NoSuchMethodException) {
|
||||
return
|
||||
}
|
||||
throw AssertionError("fail: method $name was found in " + clazz)
|
||||
}
|
||||
|
||||
fun checkMethodExists(clazz: Class<*>, name: String, vararg parameterTypes: Class<*>) {
|
||||
try {
|
||||
clazz.getDeclaredMethod(name, *parameterTypes)
|
||||
return
|
||||
}
|
||||
catch (e: NoSuchMethodException) {
|
||||
throw AssertionError("fail: method $name was not found in " + clazz, e)
|
||||
}
|
||||
|
||||
}
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test<T> {
|
||||
@JvmDefault
|
||||
var test: T
|
||||
get() = null!!
|
||||
set(value) {
|
||||
null!!
|
||||
}
|
||||
}
|
||||
var result = "fail"
|
||||
|
||||
interface Test2 : Test<String> {
|
||||
@JvmDefault
|
||||
override var test: String
|
||||
get() = result
|
||||
set(value) {
|
||||
result = value
|
||||
}
|
||||
}
|
||||
|
||||
class TestClass : Test2
|
||||
|
||||
fun <T> execute(t: Test<T>, p: T): T {
|
||||
t.test = p
|
||||
return t.test
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return execute(TestClass(), "OK")
|
||||
}
|
||||
-82
@@ -1,82 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
|
||||
interface Test<T> {
|
||||
@JvmDefault
|
||||
var T.test: T
|
||||
get() = null!!
|
||||
set(value) {
|
||||
null!!
|
||||
}
|
||||
|
||||
var T.foo: T
|
||||
get() = null!!
|
||||
set(value) {
|
||||
null!!
|
||||
}
|
||||
}
|
||||
|
||||
interface Test2 : Test<String> {
|
||||
@JvmDefault
|
||||
override var String.test: String
|
||||
get() = ""
|
||||
set(value) {}
|
||||
|
||||
override var String.foo: String
|
||||
get() = ""
|
||||
set(value) {}
|
||||
}
|
||||
|
||||
class TestClass : Test2
|
||||
|
||||
fun box(): String {
|
||||
checkMethodExists(Test2::class.java, "getTest", String::class.java)
|
||||
checkMethodExists(Test2::class.java, "getTest", Any::class.java)
|
||||
checkMethodExists(Test2::class.java, "setTest", Any::class.java, Any::class.java)
|
||||
checkMethodExists(Test2::class.java, "setTest", String::class.java, String::class.java)
|
||||
|
||||
checkNoMethod(Test2::class.java, "setFoo", Any::class.java, Any::class.java)
|
||||
|
||||
checkNoMethod(TestClass::class.java, "getTest", String::class.java)
|
||||
checkNoMethod(TestClass::class.java, "getTest", Any::class.java)
|
||||
checkNoMethod(TestClass::class.java, "setTest", Any::class.java, Any::class.java)
|
||||
checkNoMethod(TestClass::class.java, "setTest", String::class.java, String::class.java)
|
||||
|
||||
checkMethodExists(TestClass::class.java, "getFoo", String::class.java)
|
||||
checkMethodExists(TestClass::class.java, "getFoo", Any::class.java)
|
||||
checkMethodExists(TestClass::class.java, "setFoo", Any::class.java, Any::class.java)
|
||||
checkMethodExists(TestClass::class.java, "setFoo", String::class.java, String::class.java)
|
||||
|
||||
val test2DefaultImpls = java.lang.Class.forName("Test2\$DefaultImpls")
|
||||
checkNoMethod(test2DefaultImpls, "getTest", Test2::class.java, String::class.java)
|
||||
checkNoMethod(test2DefaultImpls, "getTest", Test2::class.java, Any::class.java)
|
||||
checkNoMethod(test2DefaultImpls, "setTest", Test2::class.java, Any::class.java, Any::class.java)
|
||||
checkNoMethod(test2DefaultImpls, "setTest", Test2::class.java, String::class.java, String::class.java)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
fun checkNoMethod(clazz: Class<*>, name: String, vararg parameterTypes: Class<*>) {
|
||||
try {
|
||||
clazz.getDeclaredMethod(name, *parameterTypes)
|
||||
}
|
||||
catch (e: NoSuchMethodException) {
|
||||
return
|
||||
}
|
||||
throw AssertionError("fail: method $name was found in " + clazz)
|
||||
}
|
||||
|
||||
fun checkMethodExists(clazz: Class<*>, name: String, vararg parameterTypes: Class<*>) {
|
||||
try {
|
||||
clazz.getDeclaredMethod(name, *parameterTypes)
|
||||
return
|
||||
}
|
||||
catch (e: NoSuchMethodException) {
|
||||
throw AssertionError("fail: method $name was not found in " + clazz, e)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
|
||||
// FILE: Test.java
|
||||
|
||||
public interface Test<T> {
|
||||
default T test(T p) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: kotlin.kt
|
||||
|
||||
interface Test2: Test<String> {
|
||||
@JvmDefault
|
||||
override fun test(p: String): String {
|
||||
return p
|
||||
}
|
||||
|
||||
fun forDefaultImpls() {}
|
||||
}
|
||||
|
||||
class TestClass : Test2
|
||||
|
||||
fun box(): String {
|
||||
checkMethodExists(Test2::class.java, "test", String::class.java)
|
||||
checkMethodExists(Test2::class.java, "test", Any::class.java)
|
||||
|
||||
checkNoMethod(TestClass::class.java, "test", String::class.java)
|
||||
checkNoMethod(TestClass::class.java, "test", Any::class.java)
|
||||
|
||||
val test2DefaultImpls = java.lang.Class.forName("Test2\$DefaultImpls")
|
||||
checkNoMethod(test2DefaultImpls, "test", Any::class.java)
|
||||
checkNoMethod(test2DefaultImpls, "test", String::class.java)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
fun checkNoMethod(clazz: Class<*>, name: String, vararg parameterTypes: Class<*>) {
|
||||
try {
|
||||
clazz.getDeclaredMethod(name, *parameterTypes)
|
||||
}
|
||||
catch (e: NoSuchMethodException) {
|
||||
return
|
||||
}
|
||||
throw AssertionError("fail: method $name was found in " + clazz)
|
||||
}
|
||||
|
||||
fun checkMethodExists(clazz: Class<*>, name: String, vararg parameterTypes: Class<*>) {
|
||||
try {
|
||||
clazz.getDeclaredMethod(name, *parameterTypes)
|
||||
return
|
||||
}
|
||||
catch (e: NoSuchMethodException) {
|
||||
throw AssertionError("fail: method $name was not found in " + clazz, e)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple extends KInterface2 {
|
||||
default String test() {
|
||||
return KInterface2.DefaultImpls.test2(this, "OK");
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Foo.java
|
||||
public class Foo implements Simple {
|
||||
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
interface KInterface<T> {
|
||||
@JvmDefault
|
||||
fun test2(p: T): T {
|
||||
return p
|
||||
}
|
||||
}
|
||||
|
||||
interface KInterface2 : KInterface<String> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
|
||||
val result = Foo().test()
|
||||
if (result != "OK") return "fail 1: ${result}"
|
||||
|
||||
return Foo().test2("OK")
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple extends KInterface2 {
|
||||
default String test() {
|
||||
return KInterface2.DefaultImpls.test2(this, "OK");
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Foo.java
|
||||
public class Foo implements Simple {
|
||||
public String test2(String p) {
|
||||
return "fail";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
interface KInterface<T> {
|
||||
@JvmDefault
|
||||
fun test2(p: T): T {
|
||||
return p
|
||||
}
|
||||
}
|
||||
|
||||
interface KInterface2 : KInterface<String> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return Foo().test()
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple extends KInterface3 {
|
||||
default String test() {
|
||||
return KInterface3.DefaultImpls.test2(this, "OK");
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Foo.java
|
||||
public class Foo implements Simple {
|
||||
public String test2(String p) {
|
||||
return "fail";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
interface KInterface<T> {
|
||||
@JvmDefault
|
||||
fun test2(p: T): T {
|
||||
return p
|
||||
}
|
||||
}
|
||||
|
||||
interface KInterface2 : KInterface<String> {
|
||||
|
||||
}
|
||||
|
||||
interface KInterface3 : KInterface2 {
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return Foo().test()
|
||||
}
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple extends KInterface2 {
|
||||
default String test() {
|
||||
return KInterface2.DefaultImpls.getBar(this);
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Foo.java
|
||||
public class Foo implements Simple {
|
||||
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
interface KInterface<T> {
|
||||
|
||||
val foo: T
|
||||
|
||||
@JvmDefault
|
||||
val bar: T
|
||||
get() = foo
|
||||
}
|
||||
|
||||
interface KInterface2 : KInterface<String> {
|
||||
@JvmDefault
|
||||
override val foo: String
|
||||
get() = "OK"
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
|
||||
val result = Foo().test()
|
||||
if (result != "OK") return "fail 1: ${result}"
|
||||
|
||||
return Foo().bar
|
||||
|
||||
}
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple extends KInterface2 {
|
||||
default String test() {
|
||||
return KInterface2.DefaultImpls.getBar(this);
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Foo.java
|
||||
public class Foo implements Simple {
|
||||
public String getBar() {
|
||||
return "fail";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
interface KInterface<T> {
|
||||
|
||||
val foo: T
|
||||
|
||||
@JvmDefault
|
||||
val bar: T
|
||||
get() = foo
|
||||
}
|
||||
|
||||
interface KInterface2 : KInterface<String> {
|
||||
@JvmDefault
|
||||
override val foo: String
|
||||
get() = "OK"
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return Foo().test()
|
||||
}
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple extends KInterface3 {
|
||||
default String test() {
|
||||
return KInterface3.DefaultImpls.getBar(this);
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Foo.java
|
||||
public class Foo implements Simple {
|
||||
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
interface KInterface<T> {
|
||||
|
||||
val foo: T
|
||||
|
||||
@JvmDefault
|
||||
val bar: T
|
||||
get() = foo
|
||||
}
|
||||
|
||||
interface KInterface2 : KInterface<String> {
|
||||
@JvmDefault
|
||||
override val foo: String
|
||||
get() = "OK"
|
||||
}
|
||||
|
||||
interface KInterface3 : KInterface2 {
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return Foo().test()
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test(s: String ="OK"): String {
|
||||
return s
|
||||
}
|
||||
}
|
||||
|
||||
class TestClass : Test {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val defaultImpls = java.lang.Class.forName(Test::class.java.canonicalName + "\$DefaultImpls")
|
||||
|
||||
val declaredMethod = defaultImpls.getDeclaredMethod("test\$default", Test::class.java, String::class.java, Int::class.java, Any::class.java)
|
||||
return declaredMethod.invoke(null, TestClass(), null, 1, null) as String
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface A {
|
||||
@JvmDefault
|
||||
fun foo(x: String = "OK"): String {
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val x = object : A {}
|
||||
return x.foo()
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface I {
|
||||
@Deprecated("message")
|
||||
@JvmDefault
|
||||
fun result() = "OK"
|
||||
}
|
||||
|
||||
fun box(): String = object : I {}.result()
|
||||
Vendored
-14
@@ -1,14 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
interface I {
|
||||
@JvmDefault
|
||||
fun foo(x: String = "OK"): String = x
|
||||
}
|
||||
|
||||
interface J : I
|
||||
|
||||
object O : J
|
||||
|
||||
fun box(): String = O.foo()
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple extends KInterface2 {
|
||||
default String test() {
|
||||
return KInterface2.DefaultImpls.test2(this);
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Foo.java
|
||||
public class Foo implements Simple {
|
||||
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
interface KInterface {
|
||||
@JvmDefault
|
||||
fun test2(): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
interface KInterface2 : KInterface {
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
val result = Foo().test()
|
||||
if (result != "OK") return "fail 1: ${result}"
|
||||
|
||||
return Foo().test2()
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
interface A {
|
||||
@JvmDefault
|
||||
fun String.foo(k: String) = "O" + k
|
||||
}
|
||||
|
||||
fun box(): String =
|
||||
object : A {
|
||||
fun box() = "FAIL".foo("K")
|
||||
}.box()
|
||||
@@ -1,27 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: A.java
|
||||
|
||||
public interface A {
|
||||
default String foo() {
|
||||
return "fail";
|
||||
}
|
||||
}
|
||||
// FILE: B.java
|
||||
|
||||
public abstract class B implements A {}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
interface KDefault : A {
|
||||
@JvmDefault
|
||||
override fun foo() = "OK"
|
||||
}
|
||||
|
||||
class Problem : B(), KDefault
|
||||
|
||||
fun box(): String {
|
||||
return Problem().foo()
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_REFLECT
|
||||
|
||||
annotation class Property(val value: String)
|
||||
annotation class Accessor(val value: String)
|
||||
|
||||
interface Z {
|
||||
@Property("OK")
|
||||
@JvmDefault
|
||||
val z: String
|
||||
@Accessor("OK")
|
||||
get() = "OK"
|
||||
}
|
||||
|
||||
|
||||
class Test : Z
|
||||
|
||||
fun box() : String {
|
||||
val value = Z::z.annotations.filterIsInstance<Property>().single().value
|
||||
if (value != "OK") return value
|
||||
return (Z::z.getter.annotations.single() as Accessor).value
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: compatibility
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple extends KInterface {
|
||||
default String test() {
|
||||
return KInterface.DefaultImpls.test2(this);
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Foo.java
|
||||
public class Foo implements Simple {
|
||||
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
interface KInterface {
|
||||
@JvmDefault
|
||||
fun test2(): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
val result = Foo().test()
|
||||
if (result != "OK") return "fail 1: ${result}"
|
||||
|
||||
return Foo().test2()
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Z {
|
||||
@JvmDefault
|
||||
fun test(s: String = "OK"): String {
|
||||
return s
|
||||
}
|
||||
}
|
||||
|
||||
class Test: Z
|
||||
|
||||
fun box(): String {
|
||||
return Test().test()
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface A {
|
||||
@JvmDefault
|
||||
fun foo(x: String = "OK"): String {
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val x = object : A {}
|
||||
return x.foo()
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test(): String {
|
||||
return "O"
|
||||
}
|
||||
|
||||
fun delegatedTest(): String {
|
||||
return "fail"
|
||||
}
|
||||
}
|
||||
|
||||
class Delegate : Test {
|
||||
override fun test(): String {
|
||||
return "Fail"
|
||||
}
|
||||
|
||||
override fun delegatedTest(): String {
|
||||
return "K"
|
||||
}
|
||||
}
|
||||
|
||||
class TestClass(val foo: Test) : Test by foo
|
||||
|
||||
fun box(): String {
|
||||
val testClass = TestClass(Delegate())
|
||||
return testClass.test() + testClass.delegatedTest()
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
val test: String
|
||||
get() = "O"
|
||||
|
||||
val testDelegated: String
|
||||
get() = "fail"
|
||||
|
||||
}
|
||||
|
||||
class Delegate : Test {
|
||||
override val test: String
|
||||
get() = "fail"
|
||||
|
||||
override val testDelegated: String
|
||||
get() = "K"
|
||||
}
|
||||
|
||||
class TestClass(val foo: Test) : Test by foo
|
||||
|
||||
fun box(): String {
|
||||
val testClass = TestClass(Delegate())
|
||||
return testClass.test + testClass.testDelegated
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
interface I {
|
||||
@JvmDefault
|
||||
fun foo(x: String = "OK"): String = x
|
||||
}
|
||||
|
||||
interface J : I
|
||||
|
||||
object O : J
|
||||
|
||||
fun box(): String = O.foo()
|
||||
@@ -1,30 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test(): String {
|
||||
return inlineProp
|
||||
}
|
||||
|
||||
fun testDefaultImpls(): String {
|
||||
return inlineProp
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
private inline val inlineProp: String
|
||||
get() = "OK"
|
||||
|
||||
}
|
||||
|
||||
class TestClass : Test {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val foo = TestClass()
|
||||
if (foo.test() != "OK") return "fail: ${foo.test()}"
|
||||
return foo.testDefaultImpls()
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Z<T> {
|
||||
@JvmDefault
|
||||
fun test(p: T): T {
|
||||
return p
|
||||
}
|
||||
}
|
||||
|
||||
open class ZImpl : Z<String>
|
||||
|
||||
class ZImpl2 : ZImpl() {
|
||||
|
||||
override fun test(p: String): String {
|
||||
return super.test(p)
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return ZImpl2().test("OK")
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Z<T> {
|
||||
@JvmDefault
|
||||
fun test(p: T): T {
|
||||
return p
|
||||
}
|
||||
}
|
||||
|
||||
open class ZImpl : Z<String>
|
||||
|
||||
open class ZImpl2 : Z<String>, ZImpl()
|
||||
|
||||
class ZImpl3 : ZImpl2() {
|
||||
|
||||
override fun test(p: String): String {
|
||||
return super.test(p)
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return ZImpl3().test("OK")
|
||||
}
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// JVM_TARGET: 1.8
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM
|
||||
interface Base {
|
||||
@@ -8,8 +8,8 @@ interface Base {
|
||||
|
||||
interface SubA : Base
|
||||
|
||||
@JvmDefaultWithCompatibility
|
||||
interface SubB : Base {
|
||||
@JvmDefault
|
||||
override fun value(): String = "OK"
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// FILE: A.java
|
||||
|
||||
public interface A {
|
||||
default String foo() {
|
||||
return "fail";
|
||||
}
|
||||
}
|
||||
// FILE: B.java
|
||||
|
||||
public abstract class B implements A {}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
interface KDefault : A {
|
||||
@JvmDefault
|
||||
override fun foo() = "OK"
|
||||
}
|
||||
|
||||
class Problem : B(), KDefault
|
||||
|
||||
fun box(): String {
|
||||
return Problem().foo()
|
||||
}
|
||||
+7
-4
@@ -1,12 +1,15 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun foo(): String = "O"
|
||||
|
||||
val bar: String
|
||||
get() = "K"
|
||||
|
||||
fun test(): String {
|
||||
return "OK"
|
||||
return (::foo).let { it() } + (::bar).let { it() }
|
||||
}
|
||||
}
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
|
||||
interface IBase {
|
||||
fun bar() = "OK"
|
||||
}
|
||||
|
||||
open class Base {
|
||||
fun foo() = "OK"
|
||||
}
|
||||
|
||||
class C : Base(), IBase {
|
||||
val lambda1 = {
|
||||
super.foo()
|
||||
}
|
||||
|
||||
val lambda2 = {
|
||||
super.bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (C().lambda1() != "OK") return "fail 1"
|
||||
|
||||
return C().lambda2()
|
||||
}
|
||||
@@ -18,7 +18,7 @@ fun box(): String {
|
||||
try {
|
||||
val defaultImpls = java.lang.Class.forName(Test::class.java.canonicalName + "\$DefaultImpls")
|
||||
} catch (e: ClassNotFoundException) {
|
||||
return "OK"
|
||||
return TestClass().test()
|
||||
}
|
||||
return "fail: DefaultImpls shouldn't be generated"
|
||||
}
|
||||
|
||||
+3
-16
@@ -4,29 +4,16 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
fun test(): String {
|
||||
return "O"
|
||||
}
|
||||
|
||||
fun delegatedTest(): String {
|
||||
return "fail"
|
||||
}
|
||||
fun test(): String = "Fail"
|
||||
}
|
||||
|
||||
class Delegate : Test {
|
||||
override fun test(): String {
|
||||
return "Fail"
|
||||
}
|
||||
|
||||
override fun delegatedTest(): String {
|
||||
return "K"
|
||||
}
|
||||
override fun test(): String = "OK"
|
||||
}
|
||||
|
||||
class TestClass(val foo: Test) : Test by foo
|
||||
|
||||
fun box(): String {
|
||||
val testClass = TestClass(Delegate())
|
||||
return testClass.test() + testClass.delegatedTest()
|
||||
return testClass.test()
|
||||
}
|
||||
|
||||
+3
-13
@@ -4,26 +4,16 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Test {
|
||||
@JvmDefault
|
||||
val test: String
|
||||
get() = "O"
|
||||
|
||||
val testDelegated: String
|
||||
get() = "fail"
|
||||
|
||||
val test: String get() = "Fail"
|
||||
}
|
||||
|
||||
class Delegate : Test {
|
||||
override val test: String
|
||||
get() = "fail"
|
||||
|
||||
override val testDelegated: String
|
||||
get() = "K"
|
||||
override val test: String get() = "OK"
|
||||
}
|
||||
|
||||
class TestClass(val foo: Test) : Test by foo
|
||||
|
||||
fun box(): String {
|
||||
val testClass = TestClass(Delegate())
|
||||
return testClass.test + testClass.testDelegated
|
||||
return testClass.test
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_REFLECT
|
||||
// FULL_JDK
|
||||
|
||||
interface Test {
|
||||
fun test(): String {
|
||||
return "Test"
|
||||
}
|
||||
}
|
||||
|
||||
open class TestClass : Test {
|
||||
|
||||
}
|
||||
|
||||
|
||||
interface Test2 : Test {
|
||||
override fun test(): String {
|
||||
return "Test2"
|
||||
}
|
||||
}
|
||||
|
||||
interface Test3 : Test2 {
|
||||
|
||||
}
|
||||
|
||||
|
||||
class TestClass2 : TestClass(), Test3 {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val test = TestClass2().test()
|
||||
if (test != "Test2") return "fail 1: $test"
|
||||
checkNoMethod(TestClass::class.java, "test")
|
||||
checkNoMethod(Test3::class.java, "test")
|
||||
checkNoMethod(TestClass2::class.java, "test")
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
fun checkNoMethod(clazz: Class<*>, name: String) {
|
||||
try {
|
||||
clazz.getDeclaredMethod(name)
|
||||
}
|
||||
catch (e: NoSuchMethodException) {
|
||||
return
|
||||
}
|
||||
throw AssertionError("fail: method $name was found in " + clazz)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// WITH_STDLIB
|
||||
// IGNORE_INLINER: IR
|
||||
|
||||
interface Test {
|
||||
fun test(): String {
|
||||
return inlineFun { "OK" }
|
||||
}
|
||||
|
||||
private inline fun inlineFun(s: () -> String) = s()
|
||||
}
|
||||
|
||||
class TestClass : Test {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val foo = TestClass()
|
||||
return foo.test()
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user