allow delegated properties to have getters and setters without bodies
This commit is contained in:
committed by
Andrey Breslav
parent
8ba15937f9
commit
e9266481c5
+1
-1
@@ -203,7 +203,7 @@ public class DefaultErrorMessages {
|
||||
MAP.put(ABSTRACT_PROPERTY_WITH_SETTER, "Property with setter implementation cannot be abstract");
|
||||
|
||||
MAP.put(ABSTRACT_DELEGATED_PROPERTY, "Delegated property cannot be abstract");
|
||||
MAP.put(ACCESSOR_FOR_DELEGATED_PROPERTY, "Delegated property cannot have accessor");
|
||||
MAP.put(ACCESSOR_FOR_DELEGATED_PROPERTY, "Delegated property cannot have accessors with non-default implementations");
|
||||
MAP.put(DELEGATED_PROPERTY_IN_TRAIT, "Delegated properties are not allowed in traits");
|
||||
MAP.put(LOCAL_VARIABLE_WITH_DELEGATE, "Local variables are not allowed to have delegates");
|
||||
|
||||
|
||||
@@ -514,12 +514,12 @@ public class BodyResolver {
|
||||
@NotNull JetScope propertyScope
|
||||
) {
|
||||
JetPropertyAccessor getter = jetProperty.getGetter();
|
||||
if (getter != null) {
|
||||
if (getter != null && getter.hasBody()) {
|
||||
trace.report(ACCESSOR_FOR_DELEGATED_PROPERTY.on(getter));
|
||||
}
|
||||
|
||||
JetPropertyAccessor setter = jetProperty.getSetter();
|
||||
if (setter != null) {
|
||||
if (setter != null && setter.hasBody()) {
|
||||
trace.report(ACCESSOR_FOR_DELEGATED_PROPERTY.on(setter));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user