[Test] Add additional test for KT-21463

This commit is contained in:
Dmitriy Novozhilov
2023-11-01 16:42:58 +02:00
committed by Space Team
parent 85665d71ca
commit e473b52da7
7 changed files with 60 additions and 0 deletions
@@ -0,0 +1,15 @@
// ISSUE: KT-21463
interface BoxWrapper<T, B : Box<T>> {
val box: B
}
interface Box<T> {
val item: T
}
fun <T> getBoxWrapper(): BoxWrapper<T, *> = null!!
class Element
val box: Box<Element> = getBoxWrapper<Element>().box
@@ -0,0 +1,15 @@
// ISSUE: KT-21463
interface BoxWrapper<T, B : Box<T>> {
val box: B
}
interface Box<T> {
val item: T
}
fun <T> getBoxWrapper(): BoxWrapper<T, *> = null!!
class Element
val box: Box<Element> = <!TYPE_MISMATCH!>getBoxWrapper<Element>().box<!>