Replace usages of addToStdlib.firstNotNullResult with firstNotNullOfOrNull
This commit is contained in:
committed by
TeamCityServer
parent
24b6c5df56
commit
d114913cd2
@@ -39,7 +39,6 @@ import org.jetbrains.kotlin.serialization.js.KotlinJavascriptSerializationUtil
|
||||
import org.jetbrains.kotlin.serialization.js.ModuleKind
|
||||
import org.jetbrains.kotlin.serialization.js.PackagesWithHeaderMetadata
|
||||
import org.jetbrains.kotlin.utils.JsMetadataVersion
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult
|
||||
|
||||
abstract class AbstractTopDownAnalyzerFacadeForJS {
|
||||
|
||||
@@ -126,14 +125,14 @@ abstract class AbstractTopDownAnalyzerFacadeForJS {
|
||||
// Mimic the behavior in the jvm frontend. The extensions have 2 chances to override the normal analysis:
|
||||
// * If any of the extensions returns a non-null result, it. Otherwise do the normal analysis.
|
||||
// * `analysisCompleted` can be used to override the result, too.
|
||||
var result = analysisHandlerExtensions.firstNotNullResult { extension ->
|
||||
var result = analysisHandlerExtensions.firstNotNullOfOrNull { extension ->
|
||||
extension.doAnalysis(project, moduleContext.module, moduleContext, files, trace, container)
|
||||
} ?: run {
|
||||
container.get<LazyTopDownAnalyzer>().analyzeDeclarations(TopDownAnalysisMode.TopLevelDeclarations, files)
|
||||
AnalysisResult.success(trace.bindingContext, moduleContext.module)
|
||||
}
|
||||
|
||||
result = analysisHandlerExtensions.firstNotNullResult { extension ->
|
||||
result = analysisHandlerExtensions.firstNotNullOfOrNull { extension ->
|
||||
extension.analysisCompleted(project, moduleContext.module, trace, files)
|
||||
} ?: result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user