visibility can be set only after resolve overridden members, so method 'setVisibility' was separated

This commit is contained in:
Svetlana Isakova
2012-04-03 16:34:49 +04:00
parent 31cf0ce736
commit f64920246a
9 changed files with 53 additions and 37 deletions
@@ -251,12 +251,12 @@ public abstract class CodegenContext {
PropertyDescriptor myAccessor = new PropertyDescriptor(contextType,
Collections.<AnnotationDescriptor>emptyList(),
pd.getModality(),
pd.getVisibility(),
pd.isVar(),
pd.isObjectDeclaration(),
pd.getName() + "$bridge$" + accessors.size(),
CallableMemberDescriptor.Kind.DECLARATION
);
myAccessor.setVisibility(pd.getVisibility());
JetType receiverType = pd.getReceiverParameter().exists() ? pd.getReceiverParameter().getType() : null;
myAccessor.setType(pd.getType(), Collections.<TypeParameterDescriptor>emptyList(), pd.getExpectedThisObject(), receiverType);