FIR: support proper overriding of generic functions
This commit is contained in:
committed by
Mikhail Glukhikh
parent
7b9f5293da
commit
d19a250cbe
@@ -0,0 +1,15 @@
|
||||
interface I {
|
||||
fun <T : Comparable<T>> f(t: List<T>): Any// T = D, List<D> == List<D>
|
||||
}
|
||||
|
||||
abstract class Base {
|
||||
fun <D : Comparable<D>> f(t: List<D>) {}
|
||||
}
|
||||
|
||||
|
||||
class C : Base(), I
|
||||
|
||||
|
||||
fun f(list: List<Int>) {
|
||||
C().f(list)
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
FILE: generics.kt
|
||||
public abstract interface I : R|kotlin/Any| {
|
||||
public abstract fun <T : R|kotlin/Comparable<T>|> f(t: R|kotlin/collections/List<T>|): R|kotlin/Any|
|
||||
|
||||
}
|
||||
public abstract class Base : R|kotlin/Any| {
|
||||
public constructor(): R|Base| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun <D : R|kotlin/Comparable<D>|> f(t: R|kotlin/collections/List<D>|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public final class C : R|Base|, R|I| {
|
||||
public constructor(): R|C| {
|
||||
super<R|Base|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final fun f(list: R|kotlin/collections/List<kotlin/Int>|): R|kotlin/Unit| {
|
||||
R|/C.C|().R|/Base.f|<R|kotlin/Int|>(R|<local>/list|)
|
||||
}
|
||||
Reference in New Issue
Block a user