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


           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: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          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
inaccessible:

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

Reply via email to