Added 'local' visibility to local descriptors

This commit is contained in:
Svetlana Isakova
2012-03-29 20:38:20 +04:00
parent 3c5d4f6857
commit 13173f75b5
3 changed files with 13 additions and 1 deletions
@@ -28,7 +28,7 @@ import java.util.Set;
/** /**
* @author abreslav * @author abreslav
*/ */
public interface CallableDescriptor extends DeclarationDescriptor { public interface CallableDescriptor extends DeclarationDescriptorWithVisibility {
@NotNull @NotNull
ReceiverDescriptor getReceiverParameter(); ReceiverDescriptor getReceiverParameter();
@@ -59,4 +59,10 @@ public class LocalVariableDescriptor extends VariableDescriptorImpl {
public boolean isObjectDeclaration() { public boolean isObjectDeclaration() {
return false; return false;
} }
@NotNull
@Override
public Visibility getVisibility() {
return Visibilities.LOCAL;
}
} }
@@ -125,4 +125,10 @@ public class ValueParameterDescriptorImpl extends VariableDescriptorImpl impleme
public ValueParameterDescriptor copy(@NotNull DeclarationDescriptor newOwner) { public ValueParameterDescriptor copy(@NotNull DeclarationDescriptor newOwner) {
return new ValueParameterDescriptorImpl(newOwner, index, Lists.newArrayList(getAnnotations()), getName(), isVar, getType(), hasDefaultValue, varargElementType); return new ValueParameterDescriptorImpl(newOwner, index, Lists.newArrayList(getAnnotations()), getName(), isVar, getType(), hasDefaultValue, varargElementType);
} }
@NotNull
@Override
public Visibility getVisibility() {
return Visibilities.LOCAL;
}
} }