Delegated properties never require backing field #KT-10107 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-12-11 16:03:15 +03:00
parent 9d753f24b7
commit fdc9e9d7f5
4 changed files with 31 additions and 0 deletions
@@ -174,6 +174,8 @@ public interface BindingContext {
backingFieldRequired; // this part is unused because we do not allow access to constructor parameters in member bodies
}
if (propertyDescriptor.getModality() == Modality.ABSTRACT) return false;
if (declarationPsiElement instanceof KtProperty &&
((KtProperty) declarationPsiElement).hasDelegate()) return false;
PropertyGetterDescriptor getter = propertyDescriptor.getGetter();
PropertySetterDescriptor setter = propertyDescriptor.getSetter();