[Mono-bugs] [Bug 364682] New: gmcs fails to resolve "new" accessible member when another one is inaccessible

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Feb 25 17:01:16 EST 2008


           Summary: gmcs fails to resolve "new" accessible member when
                    another one is inaccessible
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: atsushi at ximian.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

(Picked from FreeTrain sources.)

The example below contains two "Whoa" properties, one is new and protected, and
another one is in base and public. It fails to compile, saying that "Whoa" is

public class Foo
        protected internal class Bar : Baz
                protected new string Whoa { get { return ""; } }

        static string Get (object bar)
                return ((Bar) bar).Whoa;

public class Baz
        public string Whoa { get { return ""; } }

test.cs(10,36): error CS0122: `Foo.Bar.Whoa' is inaccessible due to its
on level
test.cs(5,45): (Location of the symbol related to previous error)


I've read section 14.3 of ECMA-334 and looks like it should resolve to the
base/public member (as the "set of accessible members" here does not contain
the protected one).

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