FirClassAnySynthesizedMemberScope.kt: make it a declared member scope

Related to KT-54844, KT-58926
This commit is contained in:
Mikhail Glukhikh
2023-05-26 09:04:31 +02:00
committed by Space Team
parent 0ea0346ec1
commit 668157eb41
15 changed files with 222 additions and 72 deletions
@@ -0,0 +1,42 @@
FILE: delegatedDataClass.kt
public abstract interface AnyNeighbor : R|kotlin/Any| {
public abstract override operator fun equals(other: R|kotlin/Any?|): R|kotlin/Boolean|
public abstract override fun hashCode(): R|kotlin/Int|
public abstract override fun toString(): R|kotlin/String|
}
public final class Impl : R|AnyNeighbor| {
public constructor(): R|Impl| {
super<R|kotlin/Any|>()
}
public open override operator fun equals(other: R|kotlin/Any?|): R|kotlin/Boolean| {
^equals Boolean(true)
}
public open override fun hashCode(): R|kotlin/Int| {
^hashCode Int(0)
}
public open override fun toString(): R|kotlin/String| {
^toString String()
}
}
public final data class Data : R|AnyNeighbor| {
public constructor(i: R|Impl|): R|Data| {
super<R|kotlin/Any|>()
}
private final field $$delegate_0: R|AnyNeighbor| = R|<local>/i|
public final val i: R|Impl| = R|<local>/i|
public get(): R|Impl|
public final operator fun component1(): R|Impl|
public final fun copy(i: R|Impl| = this@R|/Data|.R|/Data.i|): R|Data|
}
@@ -0,0 +1,25 @@
// SCOPE_DUMP: Data:equals, Data:hashCode, Data:toString
interface AnyNeighbor {
override fun equals(other: Any?): Boolean
override fun hashCode(): Int
override fun toString(): String
}
class Impl : AnyNeighbor {
override fun equals(other: Any?): Boolean {
return true
}
override fun hashCode(): Int {
return 0
}
override fun toString(): String {
return ""
}
}
data class Data(val i: Impl) : AnyNeighbor by i
@@ -0,0 +1,14 @@
Data:
[Delegated]: public open override operator fun equals(other: R|kotlin/Any?|): R|kotlin/Boolean| from Use site scope of /Data [id: 0]
[Source]: public abstract override operator fun equals(other: R|kotlin/Any?|): R|kotlin/Boolean| from Use site scope of /AnyNeighbor [id: 1]
[Library]: public open operator fun equals(other: R|kotlin/Any?|): R|kotlin/Boolean| from Use site scope of kotlin/Any [id: 2]
Data:
[Delegated]: public open override fun hashCode(): R|kotlin/Int| from Use site scope of /Data [id: 0]
[Source]: public abstract override fun hashCode(): R|kotlin/Int| from Use site scope of /AnyNeighbor [id: 1]
[Library]: public open fun hashCode(): R|kotlin/Int| from Use site scope of kotlin/Any [id: 2]
Data:
[Delegated]: public open override fun toString(): R|kotlin/String| from Use site scope of /Data [id: 0]
[Source]: public abstract override fun toString(): R|kotlin/String| from Use site scope of /AnyNeighbor [id: 1]
[Library]: public open fun toString(): R|kotlin/String| from Use site scope of kotlin/Any [id: 2]