KT-13719 'var' can be made 'val' highlighting range with annotation before
#KT-13719 Fixed
This commit is contained in:
@@ -127,9 +127,10 @@ class CanBeValInspection : AbstractKotlinInspection() {
|
||||
}
|
||||
|
||||
private fun reportCanBeVal(declaration: KtValVarKeywordOwner) {
|
||||
val keyword = declaration.valOrVarKeyword!!
|
||||
val problemDescriptor = holder.manager.createProblemDescriptor(
|
||||
declaration,
|
||||
declaration.valOrVarKeyword!!,
|
||||
keyword,
|
||||
keyword,
|
||||
"Variable is never modified and can be declared immutable using 'val'",
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
isOnTheFly,
|
||||
|
||||
Reference in New Issue
Block a user