[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)
}