Kapt: Support new @JvmDefault functionality (KT-25960)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
|
||||
interface Foo {
|
||||
fun foo() {
|
||||
System.out.println("foo")
|
||||
}
|
||||
|
||||
fun foo2(a: Int) {
|
||||
System.out.println("foo2")
|
||||
}
|
||||
|
||||
fun bar()
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public abstract interface Foo {
|
||||
|
||||
public default void foo() {
|
||||
}
|
||||
|
||||
public default void foo2(int a) {
|
||||
}
|
||||
|
||||
public abstract void bar();
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
|
||||
interface Foo {
|
||||
fun foo() {
|
||||
System.out.println("foo")
|
||||
}
|
||||
|
||||
fun foo2(a: Int) {
|
||||
System.out.println("foo2")
|
||||
}
|
||||
|
||||
fun bar()
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public abstract interface Foo {
|
||||
|
||||
public default void foo() {
|
||||
}
|
||||
|
||||
public default void foo2(int a) {
|
||||
}
|
||||
|
||||
public abstract void bar();
|
||||
|
||||
@kotlin.Metadata()
|
||||
public static final class DefaultImpls {
|
||||
|
||||
public DefaultImpls() {
|
||||
super();
|
||||
}
|
||||
|
||||
@java.lang.Deprecated()
|
||||
public static void foo(@org.jetbrains.annotations.NotNull()
|
||||
Foo $this) {
|
||||
}
|
||||
|
||||
@java.lang.Deprecated()
|
||||
public static void foo2(@org.jetbrains.annotations.NotNull()
|
||||
Foo $this, int a) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
|
||||
interface Foo {
|
||||
fun foo() {
|
||||
System.out.println("foo")
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
fun foo2(a: Int) {
|
||||
System.out.println("foo2")
|
||||
}
|
||||
|
||||
fun bar()
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public abstract interface Foo {
|
||||
|
||||
public abstract void foo();
|
||||
|
||||
public default void foo2(int a) {
|
||||
}
|
||||
|
||||
public abstract void bar();
|
||||
|
||||
@kotlin.Metadata()
|
||||
public static final class DefaultImpls {
|
||||
|
||||
public DefaultImpls() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static void foo(@org.jetbrains.annotations.NotNull()
|
||||
Foo $this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
|
||||
interface Foo {
|
||||
fun foo() {
|
||||
System.out.println("foo")
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
fun foo2(a: Int) {
|
||||
System.out.println("foo2")
|
||||
}
|
||||
|
||||
fun bar()
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public abstract interface Foo {
|
||||
|
||||
public abstract void foo();
|
||||
|
||||
public default void foo2(int a) {
|
||||
}
|
||||
|
||||
public abstract void bar();
|
||||
|
||||
@kotlin.Metadata()
|
||||
public static final class DefaultImpls {
|
||||
|
||||
public DefaultImpls() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static void foo(@org.jetbrains.annotations.NotNull()
|
||||
Foo $this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user