a02cf76d6c
Before this commit, we assumed (erroneously) that a captured type cannot have an associated SAM-based function type. In this commit we changed this assumption, replacing a captured type with its lower type for this purpose #KT-63379 Fixed
19 lines
329 B
Kotlin
Vendored
19 lines
329 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// ISSUE: KT-63379
|
|
|
|
class TestDummyClass<T> {
|
|
fun testFun(t: T) {}
|
|
}
|
|
|
|
fun more(t: TestDummyClass<in CustomRunnable>) {
|
|
t.testFun { Unit }
|
|
t.testFun(CustomRunnable { Unit })
|
|
t.testFun(object : CustomRunnable {
|
|
override fun run() {}
|
|
})
|
|
}
|
|
|
|
fun interface CustomRunnable {
|
|
fun run()
|
|
}
|