[NI] Introduce type depth in CS calculator to avoid SOE
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
class A : FirstOwner<Holder<A>>
|
||||
class B : SecondOwner<Holder<B>>
|
||||
|
||||
interface FirstOwner<T : StubElement<*>> : SecondOwner<T>
|
||||
interface SecondOwner<T : StubElement<*>>
|
||||
|
||||
interface StubElement<T>
|
||||
|
||||
interface Holder<T> : StubElement<T>
|
||||
|
||||
fun test(a: A?, b: B) {
|
||||
val c = a ?: b
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(A(), B())
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user