[NI] Rename NewConstraintSystem.diagnostics to errors
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ class ConeInapplicableCandidateError(
|
||||
constructor(applicability: CandidateApplicability, candidate: Candidate) : this(
|
||||
applicability,
|
||||
candidate.symbol,
|
||||
candidate.system.diagnostics
|
||||
candidate.system.errors
|
||||
)
|
||||
|
||||
override val reason: String get() = "Inapplicable($applicability): ${describeSymbol(candidateSymbol)}"
|
||||
|
||||
+2
-2
@@ -299,12 +299,12 @@ class CoroutineInferenceSession(
|
||||
|
||||
for (completedCall in commonCalls) {
|
||||
updateCall(completedCall, nonFixedTypesToResultSubstitutor, nonFixedTypesToResult)
|
||||
reportErrors(completedCall, completedCall.resolvedCall, commonSystem.diagnostics)
|
||||
reportErrors(completedCall, completedCall.resolvedCall, commonSystem.errors)
|
||||
}
|
||||
|
||||
for (callInfo in partiallyResolvedCallsInfo) {
|
||||
val resolvedCall = completeCall(callInfo, atomCompleter) ?: continue
|
||||
reportErrors(callInfo, resolvedCall, commonSystem.diagnostics)
|
||||
reportErrors(callInfo, resolvedCall, commonSystem.errors)
|
||||
}
|
||||
|
||||
for (simpleCall in simpleCommonCalls) {
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@ abstract class ManyCandidatesResolver<D : CallableDescriptor>(
|
||||
diagnosticsHolder: KotlinDiagnosticsHolder.SimpleHolder,
|
||||
commonSystem: NewConstraintSystem
|
||||
): CallResolutionResult {
|
||||
val diagnostics = diagnosticsHolder.getDiagnostics() + callResolutionResult.diagnostics + commonSystem.diagnostics.asDiagnostics()
|
||||
val diagnostics = diagnosticsHolder.getDiagnostics() + callResolutionResult.diagnostics + commonSystem.errors.asDiagnostics()
|
||||
return CompletedCallResolutionResult(callResolutionResult.resultCallAtom, diagnostics, commonSystem.asReadOnlyStorage())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ class PSICallResolver(
|
||||
): ManyCandidates<D> {
|
||||
val resolvedCalls = diagnostic.candidates.map {
|
||||
kotlinToResolvedCallTransformer.onlyTransform<D>(
|
||||
it.resolvedCall, it.diagnosticsFromResolutionParts + it.getSystem().diagnostics.asDiagnostics()
|
||||
it.resolvedCall, it.diagnosticsFromResolutionParts + it.getSystem().errors.asDiagnostics()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -236,7 +236,7 @@ class KotlinCallCompleter(
|
||||
}
|
||||
}
|
||||
|
||||
constraintSystem.diagnostics.forEach(diagnosticsHolder::addError)
|
||||
constraintSystem.errors.forEach(diagnosticsHolder::addError)
|
||||
}
|
||||
|
||||
private fun prepareCandidateForCompletion(
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintSystemError
|
||||
|
||||
interface NewConstraintSystem {
|
||||
val hasContradiction: Boolean
|
||||
val diagnostics: List<ConstraintSystemError>
|
||||
val errors: List<ConstraintSystemError>
|
||||
|
||||
fun getBuilder(): ConstraintSystemBuilder
|
||||
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ class NewConstraintSystemImpl(
|
||||
}
|
||||
}
|
||||
|
||||
override val diagnostics: List<ConstraintSystemError>
|
||||
override val errors: List<ConstraintSystemError>
|
||||
get() = storage.errors
|
||||
|
||||
override fun getBuilder() = apply { checkState(State.BUILDING, State.COMPLETION, State.TRANSACTION) }
|
||||
|
||||
+1
-1
@@ -166,7 +166,7 @@ class KotlinResolutionCandidate(
|
||||
get() {
|
||||
processParts(stopOnFirstError = false)
|
||||
|
||||
val systemApplicability = getResultApplicability(getSystem().diagnostics)
|
||||
val systemApplicability = getResultApplicability(getSystem().errors)
|
||||
return maxOf(currentApplicability, systemApplicability, variableApplicability)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user