[Tests] Add regression test for #KT-62865

This commit is contained in:
Kirill Rakhman
2023-12-15 10:34:27 +01:00
committed by Space Team
parent eb0f4167b3
commit 984493fe8b
5 changed files with 63 additions and 0 deletions
@@ -0,0 +1,18 @@
// FULL_JDK
// ISSUE: KT-62865
// FILE: test.kt
import java.util.function.Consumer
fun foo(x: Any) {}
class A {
fun doOnSuccess(consumer: Consumer<in String>) {
}
}
fun example() {
val instance = A()
instance.doOnSuccess(::foo)
}
@@ -0,0 +1,27 @@
@kotlin.Metadata
public final class A {
// source: 'test.kt'
public method <init>(): void
public final method doOnSuccess(@org.jetbrains.annotations.NotNull p0: java.util.function.Consumer): void
}
@kotlin.Metadata
synthetic final class TestKt$example$1 {
// source: 'test.kt'
enclosing method TestKt.example()V
public final static field INSTANCE: TestKt$example$1
inner (anonymous) class TestKt$example$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(p0: java.lang.Object): java.lang.Object
public final method invoke(p0: java.lang.Object): void
}
@kotlin.Metadata
public final class TestKt {
// source: 'test.kt'
inner (anonymous) class TestKt$example$1
private final static method example$lambda$0(p0: kotlin.jvm.functions.Function1, p1: java.lang.Object): void
public final static method example(): void
public final static method foo(@org.jetbrains.annotations.NotNull p0: java.lang.Object): void
}