Files
kotlin-fork/compiler/testData/ir/irText/classes/fakeOverridesForAnyMembers.kt.txt
T
Dmitriy Novozhilov d4f55894b4 [FIR2IR] Properly calculate dispatch receiver type for fake overrides
If some function is not fake-override, then its type should be just
  default type of containing class
For fake overrides the default type calculated in the following way:
1. Find first overridden function, which is not fake override
2. Take its containing class
3. Find supertype of current containing class with type constructor of
   class from step 2

^KT-60252 Fixed
2023-08-25 21:06:15 +00:00

41 lines
511 B
Kotlin
Vendored

open class A<A_T : Any?> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
open class B<B_T : Any?> : A<B_T> {
constructor() /* primary */ {
super/*A*/<B_T>()
/* <init>() */
}
override fun hashCode(): Int {
return 0
}
}
open class C<C_T : Any?> : B<C_T> {
constructor() /* primary */ {
super/*B*/<C_T>()
/* <init>() */
}
}
open class D<D_T : Any?> : C<D_T> {
constructor() /* primary */ {
super/*C*/<D_T>()
/* <init>() */
}
}