[NI] Fix KotlinResolutionCandidate.isSuccessfull

Check if ConstrainSystem has any contradiction in 'isSuccessful'.
Otherwise we may erroneously think that there are some successful
candidates in 'TowerResolver.SuccessfullResultCollector.pushCandidates()'
and clear other unsuccessful ones (while they actually may have higher
applicability).
This commit is contained in:
Dmitry Savvinov
2017-11-27 19:52:22 +03:00
parent 78a526c937
commit e2d65adc7e
@@ -145,7 +145,7 @@ class KotlinResolutionCandidate(
override val isSuccessful: Boolean
get() {
processParts(stopOnFirstError = true)
return currentApplicability.isSuccess && variableApplicability.isSuccess
return currentApplicability.isSuccess && variableApplicability.isSuccess && !getSystem().hasContradiction
}
override val resultingApplicability: ResolutionCandidateApplicability