From 06e0fde74f80d4cba2bc76877d89230c8aa9c231 Mon Sep 17 00:00:00 2001 From: Alexey Sedunov Date: Tue, 16 Oct 2018 15:32:58 +0300 Subject: [PATCH] Inspections: Report "unresolved property" only if reference is soft #KT-27619 Fixed --- .../inspections/KotlinInvalidBundleOrPropertyInspection.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/i18n/inspections/KotlinInvalidBundleOrPropertyInspection.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/i18n/inspections/KotlinInvalidBundleOrPropertyInspection.kt index 438ba0c636e..5ccbb1ef9ec 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/i18n/inspections/KotlinInvalidBundleOrPropertyInspection.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/i18n/inspections/KotlinInvalidBundleOrPropertyInspection.kt @@ -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 }