K2: Fix compilation after making Candidate::symbol a var
See the previous commits Explicit cast became necessary as the smart cast stopped working there
This commit is contained in:
committed by
Space Team
parent
034671ad78
commit
3aa635a766
+1
-1
@@ -48,7 +48,7 @@ internal object CheckCallableReferenceExpectedType : CheckerStage() {
|
||||
else -> null
|
||||
}
|
||||
|
||||
val fir: FirCallableDeclaration = candidate.symbol.fir
|
||||
val fir: FirCallableDeclaration = candidate.symbol.fir as FirCallableDeclaration
|
||||
|
||||
val (rawResultingType, callableReferenceAdaptation) = buildReflectionType(fir, resultingReceiverType, candidate, context)
|
||||
val resultingType = candidate.substitutor.substituteOrSelf(rawResultingType)
|
||||
|
||||
+2
-1
@@ -117,9 +117,10 @@ class ConeOverloadConflictResolver(
|
||||
}
|
||||
|
||||
private fun Candidate.overrides(other: Candidate): Boolean {
|
||||
val symbol = symbol
|
||||
if (symbol !is FirCallableSymbol || other.symbol !is FirCallableSymbol) return false
|
||||
|
||||
val otherOriginal = other.symbol.unwrapSubstitutionOverrides()
|
||||
val otherOriginal = (other.symbol as FirCallableSymbol).unwrapSubstitutionOverrides()
|
||||
if (symbol.unwrapSubstitutionOverrides<FirCallableSymbol<*>>() == otherOriginal) return true
|
||||
|
||||
val scope = originScope as? FirTypeScope ?: return false
|
||||
|
||||
Reference in New Issue
Block a user