FIR: Get rid of CallableId::classId usages

Use dispatchReceiverType or containingClassAttr instead
This commit is contained in:
Denis Zharkov
2020-10-23 17:04:41 +03:00
parent 9996c983c9
commit 4d9ef4d414
31 changed files with 152 additions and 151 deletions
@@ -5,6 +5,7 @@
package org.jetbrains.kotlin.fir.resolve.calls.jvm
import org.jetbrains.kotlin.fir.containingClass
import org.jetbrains.kotlin.fir.declarations.*
import org.jetbrains.kotlin.fir.resolve.calls.AbstractConeCallConflictResolver
import org.jetbrains.kotlin.fir.resolve.calls.Candidate
@@ -31,10 +32,10 @@ class ConeEquivalentCallConflictResolver(
val result = mutableSetOf<Candidate>()
outerLoop@ for (myCandidate in candidates) {
val me = myCandidate.symbol.fir
if (me is FirCallableMemberDeclaration<*> && me.symbol.callableId.className == null) {
if (me is FirCallableMemberDeclaration<*> && me.symbol.containingClass() == null) {
for (otherCandidate in result) {
val other = otherCandidate.symbol.fir
if (other is FirCallableMemberDeclaration<*> && other.symbol.callableId.className == null) {
if (other is FirCallableMemberDeclaration<*> && other.symbol.containingClass() == null) {
if (areEquivalentTopLevelCallables(me, myCandidate, other, otherCandidate)) {
continue@outerLoop
}
@@ -71,4 +72,4 @@ class ConeEquivalentCallConflictResolver(
else -> error("Not supported: $declaration")
}
}
}
}