Don't use builder inference if possible
The builder inference is running only if there are still uninferred type variables ^KT-48193 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
3df5667a4b
commit
55811c8851
+1
@@ -25,6 +25,7 @@ interface ConstraintSystemCompletionContext : VariableFixationFinder.Context, Re
|
||||
fun canBeProper(type: KotlinTypeMarker): Boolean
|
||||
|
||||
fun containsOnlyFixedOrPostponedVariables(type: KotlinTypeMarker): Boolean
|
||||
fun containsOnlyFixedVariables(type: KotlinTypeMarker): Boolean
|
||||
|
||||
// mutable operations
|
||||
fun addError(error: ConstraintSystemError)
|
||||
|
||||
+8
@@ -482,6 +482,14 @@ class NewConstraintSystemImpl(
|
||||
}
|
||||
}
|
||||
|
||||
override fun containsOnlyFixedVariables(type: KotlinTypeMarker): Boolean {
|
||||
checkState(State.BUILDING, State.COMPLETION)
|
||||
return !type.contains {
|
||||
val typeConstructor = it.typeConstructor()
|
||||
storage.notFixedTypeVariables.containsKey(typeConstructor)
|
||||
}
|
||||
}
|
||||
|
||||
// PostponedArgumentsAnalyzer.Context
|
||||
override fun buildCurrentSubstitutor(): TypeSubstitutorMarker {
|
||||
checkState(State.BUILDING, State.COMPLETION, State.TRANSACTION)
|
||||
|
||||
Reference in New Issue
Block a user