IR: Fix StackOverflowError caused by using DNN type in lambda

^KT-54140 Fixed
This commit is contained in:
Denis.Zharkov
2023-02-02 13:02:45 +01:00
committed by Space Team
parent c586d7a03a
commit 6d7096b5e9
14 changed files with 92 additions and 4 deletions
@@ -0,0 +1,15 @@
fun <T : In<T & Any>?> foo(
value: T,
range: CR<T & Any>
) = value?.run { toString() } ?: "fail"
interface In<T>
interface CR<D>
class Impl : In<Impl> {
override fun toString(): String = "OK"
}
fun box(): String {
return foo(Impl(), object : CR<Impl> {})
}