[test] Add a test for KT-55318
This commit is contained in:
committed by
Space Team
parent
cebccee4be
commit
9c6f92d697
+30
@@ -0,0 +1,30 @@
|
||||
// IGNORE_BACKEND_K1: JS_IR, NATIVE
|
||||
// ISSUE: KT-55318
|
||||
|
||||
// MODULE: lib
|
||||
// FILE: lib.kt
|
||||
package repro
|
||||
|
||||
interface I<out InterfaceTP>
|
||||
|
||||
open class Super<SuperTP> {
|
||||
fun foo(i: I</*redundant*/out SuperTP>) {}
|
||||
}
|
||||
|
||||
class Sub<SubTP>: Super<SubTP>() {
|
||||
/* override fun foo(i: I<out SubTP>) */
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
|
||||
package repro
|
||||
|
||||
class User<UserTP> {
|
||||
val sub = Sub<UserTP>()
|
||||
fun foo(i: I<UserTP>) = sub.foo(i)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user