http://bugzilla.novell.com/show_bug.cgi?id=501775

User [email protected] added comment
http://bugzilla.novell.com/show_bug.cgi?id=501775#c463613

           Summary: Wrong warning CS0109 with protected field that hides
                    field from base class
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: C#
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


I have a base class in a library that defines a protected field:

    protected int Foo = 0;

In a derived class I hide the field from the base class:

    protected new int Foo = 99;

On .NET this compiles without warnings.

On Mono I get a warning: warning CS0109: The member `Derived.Foo' does not hide
an inherited member. The new keyword is not required

If I ommit the 'new' on .NET I get warning CS0108. On Mono this compiles
without a warning.

If both classes are in the same assembly it works as expected.

It seems clearly wrong that we get different results depending on whether the
base class is in the same assembly or not. This problems is related to #463613.

-- 
Configure bugmail: http://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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to