Files
kotlin-fork/compiler/testData/ir/irText/classes/delegatedGenericImplementation.kt.txt
T
Alexander Udalov ffe0d9de70 Psi2ir: do not sort descriptors for fake override generation
Descriptors are already supposed to be sorted in scopes. The problem is
that rendering descriptors for sorting takes a lot of time (~1.5% of
total compilation time of intellij with JVM IR), and simple heuristics,
like comparing by names first, don't fully help with it.

 #KT-48233
2021-08-31 20:25:59 +02:00

70 lines
1.6 KiB
Plaintext
Vendored

interface IBase<A : Any?> {
abstract fun <B : Any?> foo(a: A, b: B)
abstract val <C : Any?> C.id: Map<A, C>?
abstract get
abstract var <D : Any?> List<D>.x: D?
abstract get
abstract set
}
class Test1<E : Any?> : IBase<E> {
constructor(i: IBase<E>) /* primary */ {
super/*Any*/()
/* <init>() */
}
private /* final field */ val $$delegate_0: IBase<E> = i
override val <C : Any?> C.id: Map<E, C>?
override get(): Map<E, C>? {
return (<this>.#$$delegate_0, <this>).<get-id><C>()
}
override var <D : Any?> List<D>.x: D?
override get(): D? {
return (<this>.#$$delegate_0, <this>).<get-x><D>()
}
override set(<set-?>: D?) {
(<this>.#$$delegate_0, <this>).<set-x><D>(<set-?> = <set-?>)
}
override fun <B : Any?> foo(a: E, b: B) {
<this>.#$$delegate_0.foo<B>(a = a, b = b)
}
}
class Test2 : IBase<String> {
constructor(j: IBase<String>) /* primary */ {
super/*Any*/()
/* <init>() */
}
var j: IBase<String>
field = j
get
set
private /* final field */ val $$delegate_0: IBase<String> = j
override val <C : Any?> C.id: Map<String, C>?
override get(): Map<String, C>? {
return (<this>.#$$delegate_0, <this>).<get-id><C>()
}
override var <D : Any?> List<D>.x: D?
override get(): D? {
return (<this>.#$$delegate_0, <this>).<get-x><D>()
}
override set(<set-?>: D?) {
(<this>.#$$delegate_0, <this>).<set-x><D>(<set-?> = <set-?>)
}
override fun <B : Any?> foo(a: String, b: B) {
<this>.#$$delegate_0.foo<B>(a = a, b = b)
}
}