Rename ResolutionCandidateApplicability to CandidateApplicability

This commit is contained in:
Dmitriy Novozhilov
2020-09-08 10:44:53 +03:00
parent db2e3f219f
commit d1568c1ce6
14 changed files with 51 additions and 53 deletions
@@ -5,8 +5,8 @@
package org.jetbrains.kotlin.resolve.calls.inference.model
import org.jetbrains.kotlin.resolve.calls.tower.ResolutionCandidateApplicability
import org.jetbrains.kotlin.resolve.calls.tower.ResolutionCandidateApplicability.*
import org.jetbrains.kotlin.resolve.calls.tower.CandidateApplicability
import org.jetbrains.kotlin.resolve.calls.tower.CandidateApplicability.*
import org.jetbrains.kotlin.types.model.KotlinTypeMarker
import org.jetbrains.kotlin.types.model.TypeVariableMarker
@@ -78,7 +78,7 @@ object SimpleConstraintSystemConstraintPosition : ConstraintPosition()
// ------------------------------------------------ Errors ------------------------------------------------
sealed class ConstraintSystemError(val applicability: ResolutionCandidateApplicability)
sealed class ConstraintSystemError(val applicability: CandidateApplicability)
class NewConstraintError(
val lowerType: KotlinTypeMarker,
@@ -5,7 +5,7 @@
package org.jetbrains.kotlin.resolve.calls.tower
enum class ResolutionCandidateApplicability {
enum class CandidateApplicability {
RESOLVED, // call success or has uncompleted inference or in other words possible successful candidate
RESOLVED_WITH_ERROR, // call has error, but it is still successful from resolution perspective
RESOLVED_NEED_PRESERVE_COMPATIBILITY, // call resolved successfully, but using new features that changes resolve
@@ -21,5 +21,5 @@ enum class ResolutionCandidateApplicability {
RESOLVED_TO_SAM_WITH_VARARG, // migration warning up to 1.5 (when resolve to function with SAM conversion and array without spread as vararg)
}
val ResolutionCandidateApplicability.isSuccess: Boolean
get() = this <= ResolutionCandidateApplicability.RESOLVED_LOW_PRIORITY
val CandidateApplicability.isSuccess: Boolean
get() = this <= CandidateApplicability.RESOLVED_LOW_PRIORITY