Distinguish PARTIAL_WITH_CFA resolve mode from just PARTIAL

So #KT-23182 Fixed
This commit is contained in:
Mikhail Glukhikh
2018-03-27 10:43:14 +02:00
parent 5d57341ee4
commit 9170aa0674
20 changed files with 39 additions and 30 deletions
@@ -173,7 +173,7 @@ class ShortenReferences(val options: (KtElement) -> Options = { Options.DEFAULT
// step 2: analyze collected elements with resolve and decide which can be shortened now and which need descriptors to be imported before shortening
val allElementsToAnalyze = visitors.flatMap { it.getElementsToAnalyze().map { it.element } }
val bindingContext = file.getResolutionFacade().analyze(allElementsToAnalyze, BodyResolveMode.PARTIAL)
val bindingContext = file.getResolutionFacade().analyze(allElementsToAnalyze, BodyResolveMode.PARTIAL_WITH_CFA)
processors.forEach { it.analyzeCollectedElements(bindingContext) }
// step 3: shorten elements that can be shortened right now