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