Don't perform Unit-conversion for functional types with type variables
#KT-40269 Fixed
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class Either
|
||||
|
||||
infix fun <A, B, C> ((A) -> B).andThen(g: (B) -> C): (A) -> C = TODO()
|
||||
|
||||
fun unsafeRunAsync(cb: (Either) -> Unit) {}
|
||||
|
||||
fun runAsync(cb: (Either) -> Unit) {
|
||||
unsafeRunAsync(cb.andThen { })
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
public fun runAsync(/*0*/ cb: (Either) -> kotlin.Unit): kotlin.Unit
|
||||
public fun unsafeRunAsync(/*0*/ cb: (Either) -> kotlin.Unit): kotlin.Unit
|
||||
public infix fun </*0*/ A, /*1*/ B, /*2*/ C> ((A) -> B).andThen(/*0*/ g: (B) -> C): (A) -> C
|
||||
|
||||
public final class Either {
|
||||
public constructor Either()
|
||||
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
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun <T> foo(f: () -> T) {}
|
||||
fun bar(g: () -> Unit) {}
|
||||
fun <K> baz(): () -> K = TODO()
|
||||
|
||||
fun test() {
|
||||
foo { bar(baz()) }
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package
|
||||
|
||||
public fun bar(/*0*/ g: () -> kotlin.Unit): kotlin.Unit
|
||||
public fun </*0*/ K> baz(): () -> K
|
||||
public fun </*0*/ T> foo(/*0*/ f: () -> T): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
Reference in New Issue
Block a user