[Test] Add regression test for KT-66336
This commit is contained in:
committed by
Space Team
parent
fcc4470b74
commit
c62fe0d107
@@ -0,0 +1,20 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-66336
|
||||
|
||||
interface A : Comparable<A>
|
||||
interface B : Comparable<B>
|
||||
|
||||
open class Base<T>
|
||||
class Derived<T : Comparable<T>, in S : T?>(expr: Base<in S>) : Base<T?>()
|
||||
|
||||
fun call(f: (String) -> Base<*>? = { null }) {}
|
||||
|
||||
fun test(b: Base<B>) {
|
||||
call {
|
||||
when (it) {
|
||||
"a" -> b
|
||||
"b" -> Derived(Base<A>())
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user