[NI] Pass resulting constraint system for error candidate

This commit is contained in:
Mikhail Zarechenskiy
2017-08-24 02:25:18 +03:00
parent 6f397f8512
commit 51be629e13
4 changed files with 22 additions and 1 deletions
@@ -54,7 +54,8 @@ class KotlinCallCompleter(
candidateForCompletion.prepareForCompletion(expectedType)
runCompletion(candidateForCompletion.resolvedCall, ConstraintSystemCompletionMode.FULL, diagnosticHolder, candidateForCompletion.getSystem(), resolutionCallbacks)
return CallResolutionResult(CallResolutionResult.Type.ERROR, candidate?.resolvedCall, diagnosticHolder.getDiagnostics(), ConstraintStorage.Empty)
val systemStorage = candidate?.getSystem()?.asReadOnlyStorage() ?: ConstraintStorage.Empty
return CallResolutionResult(CallResolutionResult.Type.ERROR, candidate?.resolvedCall, diagnosticHolder.getDiagnostics(), systemStorage)
}
val completionType = candidate.prepareForCompletion(expectedType)