Introduce VariableDescriptorForObject interface

Add implementations
Use this interface instead of CLASS_OBJECT_DECLARATION key in BindingContext
This commit is contained in:
Pavel V. Talanov
2013-07-03 16:39:54 +04:00
committed by Alexander Udalov
parent dc5bc1488c
commit a57f74c278
16 changed files with 209 additions and 98 deletions
@@ -295,9 +295,9 @@ public class DeserializedClassDescriptor extends ClassDescriptorBase implements
}
private void createEnumEntry(@NotNull MutableClassDescriptor enumClassObject, @NotNull Name name) {
PropertyDescriptorImpl property = new PropertyDescriptorImpl(enumClassObject, Collections.<AnnotationDescriptor>emptyList(),
Modality.FINAL, Visibilities.PUBLIC, false, name,
CallableMemberDescriptor.Kind.DECLARATION);
PropertyDescriptorImpl property = new PropertyDescriptorForObjectImpl(enumClassObject,
Collections.<AnnotationDescriptor>emptyList(),
Visibilities.PUBLIC, name, this);
property.setType(getDefaultType(), Collections.<TypeParameterDescriptor>emptyList(),
enumClassObject.getThisAsReceiverParameter(), NO_RECEIVER_PARAMETER);