PSI2IR fix suspend conversion tests
- support chained suspend conversion + SAM conversion - support suspend conversion in vararg elements
This commit is contained in:
committed by
teamcityserver
parent
0cc6fbbc6e
commit
d41fc0b599
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND: WASM
|
||||
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
package
|
||||
|
||||
public fun foo1(/*0*/ f: suspend () -> kotlin.String): kotlin.Unit
|
||||
public fun foo2(/*0*/ f: suspend (kotlin.Int) -> kotlin.String): kotlin.Unit
|
||||
public fun foo3(/*0*/ f: suspend () -> kotlin.Unit): kotlin.Unit
|
||||
public fun test(/*0*/ f0: suspend () -> kotlin.String, /*1*/ f1: () -> kotlin.String, /*2*/ f2: (kotlin.Int) -> kotlin.String, /*3*/ f3: () -> kotlin.Unit): kotlin.Unit
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_BACKEND: WASM
|
||||
|
||||
fun foo1(f: suspend () -> Unit) {}
|
||||
fun bar1() {}
|
||||
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
package
|
||||
|
||||
public fun bar1(): kotlin.Unit
|
||||
public fun bar2(/*0*/ x: kotlin.Int): kotlin.Unit
|
||||
public fun bar2(/*0*/ s: kotlin.String): kotlin.Unit
|
||||
public fun foo1(/*0*/ f: suspend () -> kotlin.Unit): kotlin.Unit
|
||||
public fun </*0*/ T> foo2(/*0*/ e: T, /*1*/ f: suspend (T) -> kotlin.Unit): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
+8
-14
@@ -1,7 +1,13 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// ^ TODO: get rid of T::class.java
|
||||
// IGNORE_BACKEND: JVM
|
||||
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// WITH_RUNTIME
|
||||
|
||||
class C
|
||||
|
||||
class Inv2<T, K>
|
||||
|
||||
inline fun <reified T> materialize(): T = T::class.java.newInstance()
|
||||
@@ -10,42 +16,30 @@ inline fun <reified T> foo1(crossinline f: suspend (T) -> String): T = materiali
|
||||
inline fun <reified T> foo2(crossinline f: suspend () -> T): T = materialize()
|
||||
inline fun <reified T, K> foo3(crossinline f: suspend (T) -> K): Inv2<T, K> = Inv2()
|
||||
|
||||
fun <T> foo11(f: suspend (T) -> String): T = 1 as T
|
||||
fun <T> foo11(f: suspend (T) -> String): T = C() as T
|
||||
fun <T> foo21(f: suspend () -> T): T = "" as T
|
||||
fun <T, K> foo31(f: suspend (T) -> K): Inv2<T, K> = Inv2()
|
||||
|
||||
fun <I> id(e: I): I = e
|
||||
|
||||
fun test(f: (Int) -> String, g: () -> String) {
|
||||
fun test(f: (C) -> String, g: () -> String) {
|
||||
val a0 = foo1(f)
|
||||
val a01 = foo11(f)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a0<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a01<!>
|
||||
|
||||
val a1 = foo2(g)
|
||||
val a11 = foo21(g)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>a1<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>a11<!>
|
||||
|
||||
val a2 = foo3(f)
|
||||
val a21 = foo31(f)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv2<kotlin.Int, kotlin.String>")!>a2<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv2<kotlin.Int, kotlin.String>")!>a21<!>
|
||||
|
||||
val a3 = foo1(id(f))
|
||||
val a31 = foo11(id(f))
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a3<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a31<!>
|
||||
|
||||
val a4 = foo2(id(g))
|
||||
val a41 = foo21(id(g))
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>a4<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>a41<!>
|
||||
|
||||
val a5 = foo3(id(f))
|
||||
val a51 = foo31(id(f))
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv2<kotlin.Int, kotlin.String>")!>a5<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv2<kotlin.Int, kotlin.String>")!>a51<!>
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> foo1(/*0*/ f: suspend (T) -> kotlin.String): T
|
||||
public fun </*0*/ T> foo2(/*0*/ f: suspend () -> T): T
|
||||
public fun </*0*/ T, /*1*/ K> foo3(/*0*/ f: suspend (T) -> K): Inv2<T, K>
|
||||
public fun </*0*/ I> id(/*0*/ e: I): I
|
||||
public fun test(/*0*/ f: (kotlin.Int) -> kotlin.String, /*1*/ g: () -> kotlin.String): kotlin.Unit
|
||||
|
||||
public final class Inv2</*0*/ T, /*1*/ K> {
|
||||
public constructor Inv2</*0*/ T, /*1*/ K>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun interface SuspendRunnable {
|
||||
suspend fun invoke()
|
||||
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ s: SuspendRunnable): kotlin.Unit
|
||||
public fun test(/*0*/ f: () -> kotlin.Unit): kotlin.Unit
|
||||
|
||||
public fun interface SuspendRunnable {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract suspend fun invoke(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+11
-4
@@ -1,13 +1,17 @@
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND: WASM
|
||||
|
||||
fun foo(x: () -> Int) {}
|
||||
fun foo(x: suspend () -> Int) {}
|
||||
var foo1 = false
|
||||
var foo2 = false
|
||||
|
||||
fun foo(x: () -> Int) { foo1 = true }
|
||||
fun foo(x: suspend () -> Int) { foo2 = true}
|
||||
|
||||
fun usualCall(): Int = 42
|
||||
suspend fun suspendCall(): Int = 42
|
||||
|
||||
// candidate without suspend conversions is more specific
|
||||
fun test2(f: () -> Int, g: suspend () -> Int) {
|
||||
foo(f)
|
||||
foo(g)
|
||||
@@ -15,5 +19,8 @@ fun test2(f: () -> Int, g: suspend () -> Int) {
|
||||
|
||||
fun box(): String {
|
||||
test2({ 1 }, { 2 })
|
||||
return "OK"
|
||||
return if (foo1 && foo2)
|
||||
"OK"
|
||||
else
|
||||
"foo1: $foo1; foo2: $foo2"
|
||||
}
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ x: () -> kotlin.Int): kotlin.Unit
|
||||
public fun foo(/*0*/ x: suspend () -> kotlin.Int): kotlin.Unit
|
||||
public suspend fun suspendCall(): kotlin.Int
|
||||
public fun test1(): kotlin.Unit
|
||||
public fun test2(/*0*/ f: () -> kotlin.Int, /*1*/ g: suspend () -> kotlin.Int): kotlin.Unit
|
||||
public fun usualCall(): kotlin.Int
|
||||
+2
@@ -1,6 +1,8 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND: WASM
|
||||
|
||||
fun foo(f: () -> String, g: suspend () -> String, h: suspend () -> String) {}
|
||||
|
||||
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ f: () -> kotlin.String, /*1*/ g: suspend () -> kotlin.String, /*2*/ h: suspend () -> kotlin.String): kotlin.Unit
|
||||
public fun test(/*0*/ f: () -> kotlin.String, /*1*/ g: suspend () -> kotlin.String): kotlin.Unit
|
||||
+10
-3
@@ -1,5 +1,12 @@
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND: WASM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun interface Runnable {
|
||||
fun run()
|
||||
}
|
||||
|
||||
fun interface SuspendRunnable {
|
||||
suspend fun run()
|
||||
@@ -12,7 +19,7 @@ object Test1 {
|
||||
fun call(r: SuspendRunnable) {}
|
||||
|
||||
fun bar(f: () -> Unit) {
|
||||
<!DEBUG_INFO_CALL("fqName: Test1.call; typeCall: function")!>call(f)<!>
|
||||
call(f)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,13 +31,13 @@ object Test2 {
|
||||
fun call(r: SuspendRunnable) {}
|
||||
|
||||
fun bar(f: () -> Unit) {
|
||||
<!DEBUG_INFO_CALL("fqName: Test2.Scope.call; typeCall: function")!>call(f)<!>
|
||||
call(f)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
Test2.Scope.bar { }
|
||||
Test1.Scope.bar { }
|
||||
Test2.Scope.bar { }
|
||||
return "OK"
|
||||
}
|
||||
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
package
|
||||
|
||||
public fun interface SuspendRunnable {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract suspend fun run(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object Test1 {
|
||||
private constructor Test1()
|
||||
public final fun call(/*0*/ r: () -> kotlin.Unit): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public object Scope {
|
||||
private constructor Scope()
|
||||
public final fun bar(/*0*/ f: () -> kotlin.Unit): kotlin.Unit
|
||||
public final fun call(/*0*/ r: SuspendRunnable): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public object Test2 {
|
||||
private constructor Test2()
|
||||
public final fun call(/*0*/ r: java.lang.Runnable): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public object Scope {
|
||||
private constructor Scope()
|
||||
public final fun bar(/*0*/ f: () -> kotlin.Unit): kotlin.Unit
|
||||
public final fun call(/*0*/ r: SuspendRunnable): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+3
-5
@@ -1,6 +1,8 @@
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND: WASM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
object Test1 {
|
||||
fun foo(f: () -> Unit) {}
|
||||
@@ -9,7 +11,7 @@ object Test1 {
|
||||
fun foo(f: suspend () -> Unit) {}
|
||||
|
||||
fun test(g: () -> Unit) {
|
||||
<!DEBUG_INFO_CALL("fqName: Test1.foo; typeCall: function")!>foo(g)<!>
|
||||
foo(g)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,8 +27,6 @@ object Test2 {
|
||||
fun test() {
|
||||
val result = foo(::bar)
|
||||
val result2 = foo2(::bar)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>result<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>result2<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,8 +43,6 @@ object Test3 {
|
||||
fun test() {
|
||||
val result = foo(::bar)
|
||||
val result2 = foo2(::bar)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>result<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>result2<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
package
|
||||
|
||||
public object Test1 {
|
||||
private constructor Test1()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(/*0*/ f: () -> kotlin.Unit): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public object Scope {
|
||||
private constructor Scope()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(/*0*/ f: suspend () -> kotlin.Unit): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun test(/*0*/ g: () -> kotlin.Unit): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public object Test2 {
|
||||
private constructor Test2()
|
||||
public final suspend fun bar(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun </*0*/ T> foo(/*0*/ f: suspend () -> T): T
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public object Scope {
|
||||
private constructor Scope()
|
||||
public final fun bar(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public object Test3 {
|
||||
private constructor Test3()
|
||||
public final suspend fun bar(/*0*/ x: kotlin.Int = ...): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun </*0*/ T> foo(/*0*/ f: suspend () -> T): T
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public object Scope {
|
||||
private constructor Scope()
|
||||
public final fun bar(/*0*/ x: kotlin.Int = ...): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+3
@@ -1,6 +1,9 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND: WASM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun useSuspendVararg(vararg sfn: suspend () -> Unit) {}
|
||||
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
package
|
||||
|
||||
public fun testSuspendConversionInVarargElementsAll(/*0*/ f1: () -> kotlin.Unit, /*1*/ f2: () -> kotlin.Unit, /*2*/ f3: () -> kotlin.Unit): kotlin.Unit
|
||||
public fun testSuspendConversionInVarargElementsSome(/*0*/ sf1: suspend () -> kotlin.Unit, /*1*/ f2: () -> kotlin.Unit, /*2*/ sf3: suspend () -> kotlin.Unit): kotlin.Unit
|
||||
public fun useSuspendVararg(/*0*/ vararg sfn: suspend () -> kotlin.Unit /*kotlin.Array<out suspend () -> kotlin.Unit>*/): kotlin.Unit
|
||||
+2
-2
@@ -1,6 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_BACKEND: JVM
|
||||
|
||||
fun interface SuspendRunnable {
|
||||
suspend fun invoke()
|
||||
@@ -17,8 +18,7 @@ suspend fun bar3(s: String = ""): Int = 0
|
||||
fun box(): String {
|
||||
foo1(::bar1)
|
||||
foo1(::bar2)
|
||||
|
||||
foo1(::bar3) // Should be ambiguity
|
||||
foo1(::bar3)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
package
|
||||
|
||||
public fun bar1(): kotlin.Unit
|
||||
public fun bar2(/*0*/ s: kotlin.String = ...): kotlin.Int
|
||||
public fun bar3(): kotlin.Unit
|
||||
public suspend fun bar3(/*0*/ s: kotlin.String = ...): kotlin.Int
|
||||
public fun foo1(/*0*/ s: SuspendRunnable): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public fun interface SuspendRunnable {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract suspend fun invoke(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
+1
@@ -1,6 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_BACKEND: WASM
|
||||
|
||||
fun unitCoercion(f: suspend () -> Unit) {}
|
||||
fun foo(): Int = 0
|
||||
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
package
|
||||
|
||||
public fun all(/*0*/ s: kotlin.String = ...): kotlin.Int
|
||||
public fun bar(/*0*/ i: kotlin.Int, /*1*/ l: kotlin.Long = ...): kotlin.String
|
||||
public fun baz(/*0*/ vararg ints: kotlin.Int /*kotlin.IntArray*/): kotlin.String
|
||||
public fun defaults(/*0*/ f: suspend (kotlin.Int) -> kotlin.String): kotlin.Unit
|
||||
public fun foo(): kotlin.Int
|
||||
public fun test(): kotlin.Unit
|
||||
public fun unitCoercion(/*0*/ f: suspend () -> kotlin.Unit): kotlin.Unit
|
||||
public fun unitCoercionAndDefaults(/*0*/ f: suspend () -> kotlin.Unit): kotlin.Unit
|
||||
public fun varargs(/*0*/ f: suspend (kotlin.Int, kotlin.Int, kotlin.Int) -> kotlin.String): kotlin.Unit
|
||||
+2
-2
@@ -16,7 +16,7 @@ fun test() {
|
||||
withVararg(xs = [p0]) /*~> Unit */
|
||||
}
|
||||
|
||||
::withVararg
|
||||
} /*-> IFoo */)
|
||||
::withVararg /*-> IFoo */
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -28,13 +28,13 @@ FILE fqName:<root> fileName:/withAdaptationForSam.kt
|
||||
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useFoo (foo: <root>.IFoo): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
foo: TYPE_OP type=<root>.IFoo origin=SAM_CONVERSION typeOperand=<root>.IFoo
|
||||
BLOCK type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
|
||||
GET_VAR 'p0: kotlin.Int declared in <root>.test.withVararg' type=kotlin.Int origin=null
|
||||
foo: BLOCK type=<root>.IFoo origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
|
||||
GET_VAR 'p0: kotlin.Int declared in <root>.test.withVararg' type=kotlin.Int origin=null
|
||||
TYPE_OP type=<root>.IFoo origin=SAM_CONVERSION typeOperand=<root>.IFoo
|
||||
FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in <root>.test' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in <root>
|
||||
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
FILE fqName:<root> fileName:/chainedFunSuspendConversionForSimpleExpression.kt
|
||||
CLASS INTERFACE name:SuspendRunnable modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.SuspendRunnable
|
||||
FUN name:invoke visibility:public modality:ABSTRACT <> ($this:<root>.SuspendRunnable) returnType:kotlin.Unit [suspend]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.SuspendRunnable
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:foo visibility:public modality:FINAL <> (s:<root>.SuspendRunnable) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:s index:0 type:<root>.SuspendRunnable
|
||||
BLOCK_BODY
|
||||
FUN name:bar visibility:public modality:FINAL <> () returnType:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun bar (): kotlin.Function0<kotlin.Unit> declared in <root>'
|
||||
FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Unit declared in <root>.bar'
|
||||
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
|
||||
FUN name:test visibility:public modality:FINAL <> (f:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:f index:0 type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun foo (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
GET_VAR 'f: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
CALL 'public final fun foo (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
CALL 'public final fun bar (): kotlin.Function0<kotlin.Unit> declared in <root>' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
VAR name:t type:kotlin.Function0<kotlin.Unit> [var]
|
||||
GET_VAR 'f: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
CALL 'public final fun foo (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
GET_VAR 'var t: kotlin.Function0<kotlin.Unit> [var] declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// SKIP_KT_DUMP
|
||||
|
||||
fun interface SuspendRunnable {
|
||||
suspend fun invoke()
|
||||
}
|
||||
|
||||
fun foo(s: SuspendRunnable) {}
|
||||
|
||||
fun bar(): () -> Unit = {}
|
||||
|
||||
fun test(f: () -> Unit) {
|
||||
foo(f)
|
||||
foo(bar())
|
||||
var t = f
|
||||
foo(t)
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
FILE fqName:<root> fileName:/chainedFunSuspendConversionForSimpleExpression.kt
|
||||
CLASS INTERFACE name:SuspendRunnable modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.SuspendRunnable
|
||||
FUN name:invoke visibility:public modality:ABSTRACT <> ($this:<root>.SuspendRunnable) returnType:kotlin.Unit [suspend]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.SuspendRunnable
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:foo visibility:public modality:FINAL <> (s:<root>.SuspendRunnable) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:s index:0 type:<root>.SuspendRunnable
|
||||
BLOCK_BODY
|
||||
FUN name:bar visibility:public modality:FINAL <> () returnType:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun bar (): kotlin.Function0<kotlin.Unit> declared in <root>'
|
||||
FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Unit declared in <root>.bar'
|
||||
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
|
||||
FUN name:test visibility:public modality:FINAL <> (f:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:f index:0 type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun foo (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: BLOCK type=<root>.SuspendRunnable origin=SUSPEND_CONVERSION
|
||||
FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit [suspend]
|
||||
$receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'callee: kotlin.Function0<kotlin.Unit> declared in <root>.test.suspendConversion0' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
FUNCTION_REFERENCE 'local final fun suspendConversion0 (): kotlin.Unit [suspend] declared in <root>.test' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null
|
||||
$receiver: GET_VAR 'f: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
CALL 'public final fun foo (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: BLOCK type=<root>.SuspendRunnable origin=SUSPEND_CONVERSION
|
||||
FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion1 visibility:local modality:FINAL <> ($receiver:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit [suspend]
|
||||
$receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'callee: kotlin.Function0<kotlin.Unit> declared in <root>.test.suspendConversion1' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
FUNCTION_REFERENCE 'local final fun suspendConversion1 (): kotlin.Unit [suspend] declared in <root>.test' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null
|
||||
$receiver: CALL 'public final fun bar (): kotlin.Function0<kotlin.Unit> declared in <root>' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
VAR name:t type:kotlin.Function0<kotlin.Unit> [var]
|
||||
GET_VAR 'f: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
CALL 'public final fun foo (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: BLOCK type=<root>.SuspendRunnable origin=SUSPEND_CONVERSION
|
||||
FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion2 visibility:local modality:FINAL <> ($receiver:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit [suspend]
|
||||
$receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'callee: kotlin.Function0<kotlin.Unit> declared in <root>.test.suspendConversion2' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
FUNCTION_REFERENCE 'local final fun suspendConversion2 (): kotlin.Unit [suspend] declared in <root>.test' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null
|
||||
$receiver: GET_VAR 'var t: kotlin.Function0<kotlin.Unit> [var] declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
+2
-2
@@ -36,7 +36,7 @@ fun testAdaptedCR() {
|
||||
withVarargOfInt(xs = [p0]) /*~> Unit */
|
||||
}
|
||||
|
||||
::withVarargOfInt
|
||||
} /*-> IFoo */])
|
||||
::withVarargOfInt /*-> IFoo */
|
||||
}])
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -65,13 +65,13 @@ FILE fqName:<root> fileName:/samConversionInVarargs.kt
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useVararg (vararg foos: <root>.IFoo): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
foos: VARARG type=kotlin.Array<out <root>.IFoo> varargElementType=<root>.IFoo
|
||||
TYPE_OP type=<root>.IFoo origin=SAM_CONVERSION typeOperand=<root>.IFoo
|
||||
BLOCK type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVarargOfInt visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun withVarargOfInt (vararg xs: kotlin.Int): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
|
||||
GET_VAR 'p0: kotlin.Int declared in <root>.testAdaptedCR.withVarargOfInt' type=kotlin.Int origin=null
|
||||
BLOCK type=<root>.IFoo origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVarargOfInt visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun withVarargOfInt (vararg xs: kotlin.Int): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
|
||||
GET_VAR 'p0: kotlin.Int declared in <root>.testAdaptedCR.withVarargOfInt' type=kotlin.Int origin=null
|
||||
TYPE_OP type=<root>.IFoo origin=SAM_CONVERSION typeOperand=<root>.IFoo
|
||||
FUNCTION_REFERENCE 'local final fun withVarargOfInt (p0: kotlin.Int): kotlin.Unit declared in <root>.testAdaptedCR' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVarargOfInt (vararg xs: kotlin.Int): kotlin.String declared in <root>
|
||||
|
||||
Vendored
+2
-2
@@ -37,7 +37,7 @@ fun testSamConversionOnAdapted() {
|
||||
foo1() /*~> Unit */
|
||||
}
|
||||
|
||||
::foo1
|
||||
} /*-> KRunnable */)
|
||||
::foo1 /*-> KRunnable */
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -49,10 +49,10 @@ FILE fqName:<root> fileName:/samConversionOnCallableReference.kt
|
||||
FUN name:testSamConversionOnAdapted visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun use (r: <root>.KRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
r: TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
||||
BLOCK type=kotlin.Function0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo1 visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
r: BLOCK type=<root>.KRunnable origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo1 visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
||||
FUNCTION_REFERENCE 'local final fun foo1 (): kotlin.Unit declared in <root>.testSamConversionOnAdapted' type=kotlin.Function0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in <root>
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
FILE fqName:<root> fileName:/suspendConversionInVararg.kt
|
||||
FUN name:useSuspendVararg visibility:public modality:FINAL <> (sfn:kotlin.Array<out kotlin.coroutines.SuspendFunction0<kotlin.Unit>>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:sfn index:0 type:kotlin.Array<out kotlin.coroutines.SuspendFunction0<kotlin.Unit>> varargElementType:kotlin.coroutines.SuspendFunction0<kotlin.Unit> [vararg]
|
||||
BLOCK_BODY
|
||||
FUN name:testSuspendConversionInVarargElementsSome visibility:public modality:FINAL <> (f1:kotlin.Function0<kotlin.Unit>, sf2:kotlin.coroutines.SuspendFunction0<kotlin.Unit>, f3:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:f1 index:0 type:kotlin.Function0<kotlin.Unit>
|
||||
VALUE_PARAMETER name:sf2 index:1 type:kotlin.coroutines.SuspendFunction0<kotlin.Unit>
|
||||
VALUE_PARAMETER name:f3 index:2 type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspendVararg (vararg sfn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
sfn: VARARG type=kotlin.Array<out kotlin.coroutines.SuspendFunction0<kotlin.Unit>> varargElementType=kotlin.coroutines.SuspendFunction0<kotlin.Unit>
|
||||
GET_VAR 'f1: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsSome' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
GET_VAR 'sf2: kotlin.coroutines.SuspendFunction0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsSome' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=null
|
||||
GET_VAR 'f3: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsSome' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
FUN name:testSuspendConversionInVarargElementsAll visibility:public modality:FINAL <> (f1:kotlin.Function0<kotlin.Unit>, f2:kotlin.Function0<kotlin.Unit>, f3:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:f1 index:0 type:kotlin.Function0<kotlin.Unit>
|
||||
VALUE_PARAMETER name:f2 index:1 type:kotlin.Function0<kotlin.Unit>
|
||||
VALUE_PARAMETER name:f3 index:2 type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspendVararg (vararg sfn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
sfn: VARARG type=kotlin.Array<out kotlin.coroutines.SuspendFunction0<kotlin.Unit>> varargElementType=kotlin.coroutines.SuspendFunction0<kotlin.Unit>
|
||||
GET_VAR 'f1: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsAll' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
GET_VAR 'f2: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsAll' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
GET_VAR 'f3: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsAll' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
@@ -0,0 +1,20 @@
|
||||
// SKIP_KT_DUMP
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
|
||||
fun useSuspendVararg(vararg sfn: suspend () -> Unit) {}
|
||||
|
||||
fun testSuspendConversionInVarargElementsSome(
|
||||
f1: () -> Unit,
|
||||
sf2: suspend () -> Unit
|
||||
f3: () -> Unit,
|
||||
) {
|
||||
useSuspendVararg(f1, sf2, f3)
|
||||
}
|
||||
|
||||
fun testSuspendConversionInVarargElementsAll(
|
||||
f1: () -> Unit,
|
||||
f2: () -> Unit,
|
||||
f3: () -> Unit
|
||||
) {
|
||||
useSuspendVararg(f1, f2, f3)
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
FILE fqName:<root> fileName:/suspendConversionInVararg.kt
|
||||
FUN name:useSuspendVararg visibility:public modality:FINAL <> (sfn:kotlin.Array<out kotlin.coroutines.SuspendFunction0<kotlin.Unit>>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:sfn index:0 type:kotlin.Array<out kotlin.coroutines.SuspendFunction0<kotlin.Unit>> varargElementType:kotlin.coroutines.SuspendFunction0<kotlin.Unit> [vararg]
|
||||
BLOCK_BODY
|
||||
FUN name:testSuspendConversionInVarargElementsSome visibility:public modality:FINAL <> (f1:kotlin.Function0<kotlin.Unit>, sf2:kotlin.coroutines.SuspendFunction0<kotlin.Unit>, f3:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:f1 index:0 type:kotlin.Function0<kotlin.Unit>
|
||||
VALUE_PARAMETER name:sf2 index:1 type:kotlin.coroutines.SuspendFunction0<kotlin.Unit>
|
||||
VALUE_PARAMETER name:f3 index:2 type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspendVararg (vararg sfn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
sfn: VARARG type=kotlin.Array<out kotlin.coroutines.SuspendFunction0<kotlin.Unit>> varargElementType=kotlin.coroutines.SuspendFunction0<kotlin.Unit>
|
||||
BLOCK type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION
|
||||
FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit [suspend]
|
||||
$receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'callee: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsSome.suspendConversion0' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
FUNCTION_REFERENCE 'local final fun suspendConversion0 (): kotlin.Unit [suspend] declared in <root>.testSuspendConversionInVarargElementsSome' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null
|
||||
$receiver: GET_VAR 'f1: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsSome' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
GET_VAR 'sf2: kotlin.coroutines.SuspendFunction0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsSome' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=null
|
||||
BLOCK type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION
|
||||
FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion1 visibility:local modality:FINAL <> ($receiver:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit [suspend]
|
||||
$receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'callee: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsSome.suspendConversion1' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
FUNCTION_REFERENCE 'local final fun suspendConversion1 (): kotlin.Unit [suspend] declared in <root>.testSuspendConversionInVarargElementsSome' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null
|
||||
$receiver: GET_VAR 'f3: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsSome' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
FUN name:testSuspendConversionInVarargElementsAll visibility:public modality:FINAL <> (f1:kotlin.Function0<kotlin.Unit>, f2:kotlin.Function0<kotlin.Unit>, f3:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:f1 index:0 type:kotlin.Function0<kotlin.Unit>
|
||||
VALUE_PARAMETER name:f2 index:1 type:kotlin.Function0<kotlin.Unit>
|
||||
VALUE_PARAMETER name:f3 index:2 type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspendVararg (vararg sfn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
sfn: VARARG type=kotlin.Array<out kotlin.coroutines.SuspendFunction0<kotlin.Unit>> varargElementType=kotlin.coroutines.SuspendFunction0<kotlin.Unit>
|
||||
BLOCK type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION
|
||||
FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion0 visibility:local modality:FINAL <> ($receiver:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit [suspend]
|
||||
$receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'callee: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsAll.suspendConversion0' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
FUNCTION_REFERENCE 'local final fun suspendConversion0 (): kotlin.Unit [suspend] declared in <root>.testSuspendConversionInVarargElementsAll' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null
|
||||
$receiver: GET_VAR 'f1: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsAll' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
BLOCK type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION
|
||||
FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion1 visibility:local modality:FINAL <> ($receiver:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit [suspend]
|
||||
$receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'callee: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsAll.suspendConversion1' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
FUNCTION_REFERENCE 'local final fun suspendConversion1 (): kotlin.Unit [suspend] declared in <root>.testSuspendConversionInVarargElementsAll' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null
|
||||
$receiver: GET_VAR 'f2: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsAll' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
BLOCK type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION
|
||||
FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion2 visibility:local modality:FINAL <> ($receiver:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit [suspend]
|
||||
$receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'callee: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsAll.suspendConversion2' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
FUNCTION_REFERENCE 'local final fun suspendConversion2 (): kotlin.Unit [suspend] declared in <root>.testSuspendConversionInVarargElementsAll' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null
|
||||
$receiver: GET_VAR 'f3: kotlin.Function0<kotlin.Unit> declared in <root>.testSuspendConversionInVarargElementsAll' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
FILE fqName:<root> fileName:/suspendConversionWithFunInterfaces.kt
|
||||
CLASS INTERFACE name:SuspendRunnable modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.SuspendRunnable
|
||||
FUN name:invoke visibility:public modality:ABSTRACT <> ($this:<root>.SuspendRunnable) returnType:kotlin.Unit [suspend]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.SuspendRunnable
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:foo1 visibility:public modality:FINAL <> (s:<root>.SuspendRunnable) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:s index:0 type:<root>.SuspendRunnable
|
||||
BLOCK_BODY
|
||||
FUN name:bar1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
FUN name:bar2 visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:s index:0 type:kotlin.String
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=""
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun bar2 (s: kotlin.String): kotlin.Int declared in <root>'
|
||||
CONST Int type=kotlin.Int value=0
|
||||
FUN name:bar3 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
FUN name:bar3 visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Int [suspend]
|
||||
VALUE_PARAMETER name:s index:0 type:kotlin.String
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=""
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun bar3 (s: kotlin.String): kotlin.Int [suspend] declared in <root>'
|
||||
CONST Int type=kotlin.Int value=0
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun foo1 (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
FUN_EXPR type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:bar1 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend]
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun bar1 (): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
CALL 'public final fun foo1 (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
FUN_EXPR type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:bar2 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend]
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun bar2 (s: kotlin.String): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
CALL 'public final fun foo1 (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
FUN_EXPR type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:bar3 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend]
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun bar3 (): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// SKIP_KT_DUMP
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
|
||||
fun interface SuspendRunnable {
|
||||
suspend fun invoke()
|
||||
}
|
||||
|
||||
fun foo1(s: SuspendRunnable) {}
|
||||
fun bar1() {}
|
||||
|
||||
fun bar2(s: String = ""): Int = 0
|
||||
|
||||
fun bar3() {}
|
||||
suspend fun bar3(s: String = ""): Int = 0
|
||||
|
||||
fun box() {
|
||||
foo1(::bar1)
|
||||
foo1(::bar2)
|
||||
foo1(::bar3)
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
FILE fqName:<root> fileName:/suspendConversionWithFunInterfaces.kt
|
||||
CLASS INTERFACE name:SuspendRunnable modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.SuspendRunnable
|
||||
FUN name:invoke visibility:public modality:ABSTRACT <> ($this:<root>.SuspendRunnable) returnType:kotlin.Unit [suspend]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.SuspendRunnable
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:foo1 visibility:public modality:FINAL <> (s:<root>.SuspendRunnable) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:s index:0 type:<root>.SuspendRunnable
|
||||
BLOCK_BODY
|
||||
FUN name:bar1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
FUN name:bar2 visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:s index:0 type:kotlin.String
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=""
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun bar2 (s: kotlin.String): kotlin.Int declared in <root>'
|
||||
CONST Int type=kotlin.Int value=0
|
||||
FUN name:bar3 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
FUN name:bar3 visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Int [suspend]
|
||||
VALUE_PARAMETER name:s index:0 type:kotlin.String
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=""
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun bar3 (s: kotlin.String): kotlin.Int [suspend] declared in <root>'
|
||||
CONST Int type=kotlin.Int value=0
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun foo1 (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: BLOCK type=<root>.SuspendRunnable origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:bar1 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend]
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun bar1 (): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
FUNCTION_REFERENCE 'local final fun bar1 (): kotlin.Unit [suspend] declared in <root>.box' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun bar1 (): kotlin.Unit declared in <root>
|
||||
CALL 'public final fun foo1 (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: BLOCK type=<root>.SuspendRunnable origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:bar2 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend]
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun bar2 (s: kotlin.String): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
FUNCTION_REFERENCE 'local final fun bar2 (): kotlin.Unit [suspend] declared in <root>.box' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun bar2 (s: kotlin.String): kotlin.Int declared in <root>
|
||||
CALL 'public final fun foo1 (s: <root>.SuspendRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: BLOCK type=<root>.SuspendRunnable origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:bar3 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend]
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun bar3 (): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
TYPE_OP type=<root>.SuspendRunnable origin=SAM_CONVERSION typeOperand=<root>.SuspendRunnable
|
||||
FUNCTION_REFERENCE 'local final fun bar3 (): kotlin.Unit [suspend] declared in <root>.box' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun bar3 (): kotlin.Unit declared in <root>
|
||||
Reference in New Issue
Block a user