Browse Source

Fixed conversion of getter/setter visibility.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2471 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 18 years ago
parent
commit
23b0145001
  1. 4
      src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Project/ConvertVisitorTypeMembers.cs
  2. 7
      src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Test/MemberTests.cs

4
src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Project/ConvertVisitorTypeMembers.cs

@ -195,7 +195,7 @@ namespace NRefactoryToBooConverter @@ -195,7 +195,7 @@ namespace NRefactoryToBooConverter
m.Getter = new B.Method(GetLexicalInfo(propertyDeclaration.GetRegion));
if (propertyDeclaration.GetRegion != null) {
ConvertAttributes(propertyDeclaration.GetRegion.Attributes, m.Getter.Attributes);
m.Getter.Modifiers = ConvertModifier(propertyDeclaration.GetRegion, m.Visibility);
m.Getter.Modifiers = ConvertModifier(propertyDeclaration.GetRegion, B.TypeMemberModifiers.None);
m.Getter.Body = ConvertMethodBlock(propertyDeclaration.GetRegion.Block);
m.Getter.ReturnType = m.Type;
}
@ -204,7 +204,7 @@ namespace NRefactoryToBooConverter @@ -204,7 +204,7 @@ namespace NRefactoryToBooConverter
m.Setter = new B.Method(GetLexicalInfo(propertyDeclaration.SetRegion));
if (propertyDeclaration.SetRegion != null) {
ConvertAttributes(propertyDeclaration.SetRegion.Attributes, m.Setter.Attributes);
m.Setter.Modifiers = ConvertModifier(propertyDeclaration.SetRegion, m.Visibility);
m.Setter.Modifiers = ConvertModifier(propertyDeclaration.SetRegion, B.TypeMemberModifiers.None);
m.Setter.Body = ConvertMethodBlock(propertyDeclaration.SetRegion.Block);
}
}

7
src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Test/MemberTests.cs

@ -227,6 +227,13 @@ namespace NRefactoryToBooConverter.Tests @@ -227,6 +227,13 @@ namespace NRefactoryToBooConverter.Tests
"[AA]\npublic Text as System.String:\n\t[BB]\n\tget:\n\t\tpass\n\t[CC]\n\tset:\n\t\tpass");
}
[Test]
public void PropertyWithProtectedSetter()
{
TestInClass("public string Text { get {} protected set { } }",
"public Text as System.String:\n\tget:\n\t\tpass\n\tprotected set:\n\t\tpass");
}
[Test]
public void AbstractProperty()
{

Loading…
Cancel
Save