JVM IR: generate adapted callable references as synthetic
As well as suspend conversion adapters, which are unsupported by default right now. #KT-46259 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
d60a8f9baa
commit
6e3009b82e
+11
@@ -0,0 +1,11 @@
|
||||
class A {
|
||||
private fun defaultArgs(value: Int = 0, message: String = "hello"): String = message
|
||||
|
||||
private fun myApply(f: () -> String) {}
|
||||
private fun myApplySuspend(f: suspend () -> String) {}
|
||||
|
||||
fun testDefaultArguments() {
|
||||
myApply(::defaultArgs)
|
||||
myApplySuspend(::defaultArgs)
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
@kotlin.Metadata
|
||||
synthetic final class A$testDefaultArguments$1 {
|
||||
// source: 'adaptedReference.kt'
|
||||
enclosing method A.testDefaultArguments()V
|
||||
inner (anonymous) class A$testDefaultArguments$1
|
||||
method <init>(p0: A): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
synthetic final class A$testDefaultArguments$2 {
|
||||
// source: 'adaptedReference.kt'
|
||||
enclosing method A.testDefaultArguments()V
|
||||
inner (anonymous) class A$testDefaultArguments$2
|
||||
method <init>(p0: A): void
|
||||
public final @org.jetbrains.annotations.Nullable method invoke(@org.jetbrains.annotations.Nullable p0: java.lang.Object): java.lang.Object
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class A {
|
||||
// source: 'adaptedReference.kt'
|
||||
inner (anonymous) class A$testDefaultArguments$1
|
||||
inner (anonymous) class A$testDefaultArguments$2
|
||||
public method <init>(): void
|
||||
synthetic static method defaultArgs$default(p0: A, p1: int, p2: java.lang.String, p3: int, p4: java.lang.Object): java.lang.String
|
||||
private final method defaultArgs(p0: int, p1: java.lang.String): java.lang.String
|
||||
private final method myApply(p0: kotlin.jvm.functions.Function0): void
|
||||
private final method myApplySuspend(p0: kotlin.jvm.functions.Function1): void
|
||||
public final method testDefaultArguments(): void
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
@kotlin.Metadata
|
||||
synthetic final class A$testDefaultArguments$1 {
|
||||
// source: 'adaptedReference.kt'
|
||||
enclosing method A.testDefaultArguments()V
|
||||
inner (anonymous) class A$testDefaultArguments$1
|
||||
method <init>(p0: A): void
|
||||
public synthetic final static method access$getReceiver$p(p0: A$testDefaultArguments$1): java.lang.Object
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
synthetic final class A$testDefaultArguments$2 {
|
||||
// source: 'adaptedReference.kt'
|
||||
enclosing method A.testDefaultArguments()V
|
||||
inner (anonymous) class A$testDefaultArguments$2
|
||||
method <init>(p0: A): void
|
||||
public synthetic final static method access$getReceiver$p(p0: A$testDefaultArguments$2): java.lang.Object
|
||||
public final @org.jetbrains.annotations.Nullable method invoke(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
|
||||
public synthetic bridge method invoke(p0: java.lang.Object): java.lang.Object
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class A {
|
||||
// source: 'adaptedReference.kt'
|
||||
inner (anonymous) class A$testDefaultArguments$1
|
||||
inner (anonymous) class A$testDefaultArguments$2
|
||||
public method <init>(): void
|
||||
public synthetic final static method access$testDefaultArguments$defaultArgs(p0: A): java.lang.String
|
||||
public synthetic final static method access$testDefaultArguments$defaultArgs-0(p0: A, p1: kotlin.coroutines.Continuation): java.lang.Object
|
||||
synthetic static method defaultArgs$default(p0: A, p1: int, p2: java.lang.String, p3: int, p4: java.lang.Object): java.lang.String
|
||||
private final method defaultArgs(p0: int, p1: java.lang.String): java.lang.String
|
||||
private final method myApply(p0: kotlin.jvm.functions.Function0): void
|
||||
private final method myApplySuspend(p0: kotlin.jvm.functions.Function1): void
|
||||
private synthetic final static method testDefaultArguments$defaultArgs(p0: A): java.lang.String
|
||||
private synthetic final static method testDefaultArguments$defaultArgs-0(p0: A, p1: kotlin.coroutines.Continuation): java.lang.Object
|
||||
public final method testDefaultArguments(): void
|
||||
}
|
||||
Reference in New Issue
Block a user