Minor. Simplify conditions in shouldRunCompletion
This commit is contained in:
+5
-3
@@ -36,11 +36,13 @@ class FirBuilderInferenceSession(
|
||||
|
||||
val storage = system.getBuilder().currentStorage()
|
||||
|
||||
return !storage.notFixedTypeVariables.keys.any {
|
||||
if (call.hasPostponed()) return true
|
||||
|
||||
return storage.notFixedTypeVariables.keys.all {
|
||||
val variable = storage.allTypeVariables[it]
|
||||
val isPostponed = variable != null && variable in storage.postponedTypeVariables
|
||||
!isPostponed && !components.callCompleter.completer.variableFixationFinder.isTypeVariableHasProperConstraint(system, it)
|
||||
} || call.hasPostponed()
|
||||
isPostponed || components.callCompleter.completer.variableFixationFinder.isTypeVariableHasProperConstraint(system, it)
|
||||
}
|
||||
}
|
||||
|
||||
private fun FirStatement.hasPostponed(): Boolean {
|
||||
|
||||
+2
-3
@@ -6,7 +6,6 @@
|
||||
package org.jetbrains.kotlin.resolve.calls.inference
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.impl.*
|
||||
@@ -79,10 +78,10 @@ class CoroutineInferenceSession(
|
||||
return true
|
||||
}
|
||||
|
||||
return !storage.notFixedTypeVariables.keys.any {
|
||||
return storage.notFixedTypeVariables.keys.all {
|
||||
val variable = storage.allTypeVariables[it]
|
||||
val isPostponed = variable != null && variable in storage.postponedTypeVariables
|
||||
!isPostponed && !kotlinConstraintSystemCompleter.variableFixationFinder.isTypeVariableHasProperConstraint(
|
||||
isPostponed || kotlinConstraintSystemCompleter.variableFixationFinder.isTypeVariableHasProperConstraint(
|
||||
system,
|
||||
it,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user