[Tests] Add test for #KT-65712

This commit is contained in:
Kirill Rakhman
2024-02-09 16:08:33 +01:00
committed by Space Team
parent 9391ff8179
commit 91e4837c95
7 changed files with 52 additions and 0 deletions
@@ -0,0 +1,11 @@
// ISSUE: KT-65712
fun test(a: BodySpec<List<*>, *>) {
a.value<<!UPPER_BOUND_VIOLATED!>BodySpec<List<*>, *><!>>()
a.value<<!UPPER_BOUND_VIOLATED!>BodySpec<*, *><!>>()
a.value<<!UPPER_BOUND_VIOLATED!>BodySpec<Int, *><!>>()
}
interface BodySpec<B, S : BodySpec<B, S>> {
fun <T : S> value(): T
}
@@ -0,0 +1,11 @@
// ISSUE: KT-65712
fun test(a: BodySpec<List<*>, *>) {
a.value<BodySpec<List<*>, *>>()
a.value<BodySpec<*, *>>()
a.value<BodySpec<Int, *>>()
}
interface BodySpec<B, S : BodySpec<B, S>> {
fun <T : S> value(): T
}