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