K2: Add test reproducing KT-64222

This commit is contained in:
Denis.Zharkov
2024-01-11 11:25:35 +01:00
committed by Space Team
parent dbbfb23fa9
commit 97d17012e5
7 changed files with 62 additions and 0 deletions
@@ -0,0 +1,16 @@
// ISSUE: KT-64222
interface A {
fun bar(): B<Int>
}
interface B<T>
fun <E> foo(block: B<E>.() -> Unit): B<E> = TODO()
class C : A {
private var value: B<Int>? = null
override fun <!RETURN_TYPE_MISMATCH_ON_OVERRIDE!>bar<!>() = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!> {
value = this
}
}
@@ -0,0 +1,16 @@
// ISSUE: KT-64222
interface A {
fun bar(): B<Int>
}
interface B<T>
fun <E> foo(block: B<E>.() -> Unit): B<E> = TODO()
class C : A {
private var value: B<Int>? = null
override fun bar() = foo {
value = this
}
}