[Mono-bugs] [Bug 338273] New: CS0507 erounously occurs when declaring implicit new property

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 31 16:47:22 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=338273

           Summary: CS0507 erounously occurs when declaring implicit new
                    property
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: wasabi at larvalstage.net
         QAContact: mono-bugs at ximian.com
          Found By: ---


class TestA
{

  public virtual string Method
  {
    get { return null; }
  }

}

class TestB : TestA
{

  private string Method
  {
    get { return null; }
  }

}



test.cs(14,18): error CS0507: `TestB.Method.get': cannot change access
modifiers when overriding `internal' inherited member `TestA.Method.get'
test.cs(6,5): (Location of the symbol related to previous error)
test.cs(14,18): warning CS0114: `TestB.Method' hides inherited member
`TestA.Method'. To make the current member override that implementation, add
the override keyword. Otherwise add the new keyword
test.cs(6,5): (Location of the symbol related to previous warning)
Compilation failed: 1 error(s), 1 warnings


The first error CS0507 should not occur, as I am not attempting to override a
member. It should be noted that when explicitly declaring the second method as
`new`, the error does not occur.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list