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
@@ -1,24 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
// EXPECTED_ERROR: (kotlin:20:5) modifier private not allowed here
|
||||
|
||||
interface Foo {
|
||||
fun foo() {
|
||||
System.out.println("foo")
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
fun foo2(a: Int) {
|
||||
System.out.println("foo2")
|
||||
}
|
||||
|
||||
fun bar()
|
||||
|
||||
private fun privateMethodWithDefault() {
|
||||
System.out.println("privateMethodWithDefault")
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
private fun privateMethodWithDefault2() {
|
||||
System.out.println("privateMethodWithDefault2")
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
@kotlin.Metadata()
|
||||
public abstract interface Foo {
|
||||
|
||||
public abstract void foo();
|
||||
|
||||
@kotlin.jvm.JvmDefault()
|
||||
public default void foo2(int a) {
|
||||
}
|
||||
|
||||
public abstract void bar();
|
||||
|
||||
@kotlin.jvm.JvmDefault()
|
||||
private void privateMethodWithDefault2() {
|
||||
}
|
||||
|
||||
@kotlin.Metadata()
|
||||
public static final class DefaultImpls {
|
||||
|
||||
public DefaultImpls() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static void foo(@org.jetbrains.annotations.NotNull()
|
||||
Foo $this) {
|
||||
}
|
||||
|
||||
private static void privateMethodWithDefault(Foo $this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// EXPECTED_ERROR: (kotlin:20:5) modifier private not allowed here
|
||||
|
||||
interface Foo {
|
||||
fun foo() {
|
||||
System.out.println("foo")
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
fun foo2(a: Int) {
|
||||
System.out.println("foo2")
|
||||
}
|
||||
|
||||
fun bar()
|
||||
|
||||
private fun privateMethodWithDefault() {
|
||||
System.out.println("privateMethodWithDefault")
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
private fun privateMethodWithDefault2() {
|
||||
System.out.println("privateMethodWithDefault2")
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
@kotlin.Metadata()
|
||||
public abstract interface Foo {
|
||||
|
||||
public abstract void foo();
|
||||
|
||||
@kotlin.jvm.JvmDefault()
|
||||
public default void foo2(int a) {
|
||||
}
|
||||
|
||||
public abstract void bar();
|
||||
|
||||
@kotlin.jvm.JvmDefault()
|
||||
private void privateMethodWithDefault2() {
|
||||
}
|
||||
|
||||
@kotlin.Metadata()
|
||||
public static final class DefaultImpls {
|
||||
|
||||
public DefaultImpls() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static void foo(@org.jetbrains.annotations.NotNull()
|
||||
Foo $this) {
|
||||
}
|
||||
|
||||
private static void privateMethodWithDefault(Foo $this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
-12
@@ -331,18 +331,6 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAllCompatibility.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultDisable.kt")
|
||||
public void testJvmDefaultDisable() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultDisable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnable.kt")
|
||||
public void testJvmDefaultEnable() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultEnable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmOverloads.kt")
|
||||
public void testJvmOverloads() throws Exception {
|
||||
|
||||
-12
@@ -331,18 +331,6 @@ public class IrClassFileToSourceStubConverterTestGenerated extends AbstractIrCla
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAllCompatibility.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultDisable.kt")
|
||||
public void testJvmDefaultDisable() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultDisable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmDefaultEnable.kt")
|
||||
public void testJvmDefaultEnable() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultEnable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmOverloads.kt")
|
||||
public void testJvmOverloads() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user