RAW FIR: record property accessors' own modality properly

This commit is contained in:
Jinseong Jeon
2021-02-23 15:18:03 -08:00
committed by Dmitriy Novozhilov
parent e009b71f88
commit 1090eca086
9 changed files with 39 additions and 40 deletions
@@ -195,8 +195,8 @@ val FirProperty.hasBackingField: Boolean
else -> {
val getter = getter ?: return true
if (isVar && setter == null) return true
if (setter?.hasBody == false) return true
if (!getter.hasBody) return true
if (setter?.hasBody == false && setter?.isAbstract == false) return true
if (!getter.hasBody && !getter.isAbstract) return true
return isReferredViaField == true
}