Convert AnalyzeExhaust to Kotlin and make it a data class
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ public fun JetElement.getAnalysisResults(vararg extraFiles: JetFile): AnalyzeExh
|
||||
}
|
||||
|
||||
public fun JetElement.getBindingContext(): BindingContext {
|
||||
return getAnalysisResults().getBindingContext()
|
||||
return getAnalysisResults().bindingContext
|
||||
}
|
||||
|
||||
public fun getAnalysisResultsForElements(elements: Collection<JetElement>): AnalyzeExhaust {
|
||||
|
||||
+4
-4
@@ -110,10 +110,10 @@ private class KotlinResolveCache(
|
||||
}
|
||||
perFileCache.getAnalysisResults(it)
|
||||
}
|
||||
val error = results.firstOrNull { it.isError() }
|
||||
val bindingContext = CompositeBindingContext.create(results.map { it.getBindingContext() })
|
||||
return if (error != null)
|
||||
AnalyzeExhaust.error(bindingContext, error.getError())
|
||||
val withError = results.firstOrNull { it.isError() }
|
||||
val bindingContext = CompositeBindingContext.create(results.map { it.bindingContext })
|
||||
return if (withError != null)
|
||||
AnalyzeExhaust.error(bindingContext, withError.error)
|
||||
else
|
||||
//TODO: (module refactoring) several elements are passed here in debugger
|
||||
AnalyzeExhaust.success(bindingContext, getLazyResolveSession(elements.first()).getModuleDescriptor())
|
||||
|
||||
Reference in New Issue
Block a user