Inspections: Report "unresolved property" only if reference is soft
#KT-27619 Fixed
This commit is contained in:
+4
-2
@@ -53,13 +53,15 @@ class KotlinInvalidBundleOrPropertyInspection : AbstractKotlinInspection() {
|
||||
private fun processPropertyReference(ref: PropertyReference, template: KtStringTemplateExpression) {
|
||||
val property = ref.resolve() as? Property
|
||||
if (property == null) {
|
||||
holder.registerProblem(
|
||||
if (!ref.isSoft) {
|
||||
holder.registerProblem(
|
||||
template,
|
||||
CodeInsightBundle.message("inspection.unresolved.property.key.reference.message", ref.canonicalText),
|
||||
ProblemHighlightType.LIKE_UNKNOWN_SYMBOL,
|
||||
TextRange(0, template.textLength),
|
||||
*ref.quickFixes
|
||||
)
|
||||
)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user