Attach "add remaining branches" and "add else branch" fixes to NON_EXHAUSTIVE_WHEN warning #KT-12503 Fixed
This commit is contained in:
@@ -321,7 +321,7 @@ object WhenChecker {
|
||||
return true
|
||||
}
|
||||
|
||||
private fun getMissingCases(expression: KtWhenExpression, context: BindingContext): List<WhenMissingCase> {
|
||||
fun getMissingCases(expression: KtWhenExpression, context: BindingContext): List<WhenMissingCase> {
|
||||
val type = whenSubjectType(expression, context) ?: return listOf(UnknownMissingCase)
|
||||
val nullable = !type.isFlexible() && isNullableTypeWithoutPossibleSmartCast(expression.subjectExpression, type, context)
|
||||
val checkers = exhaustivenessCheckers.filter { it.isApplicable(type) }
|
||||
|
||||
Reference in New Issue
Block a user