[Mono-bugs] [Bug 34797][Blo] New - mcs in mishandling the 'protected internal' case
30 Nov 2002 21:36:02 -0000
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by firstname.lastname@example.org.
--- shadow/34797 Sat Nov 30 16:36:02 2002
+++ shadow/34797.tmp.21084 Sat Nov 30 16:36:02 2002
@@ -0,0 +1,58 @@
+Summary: mcs in mishandling the 'protected internal' case
+Please fill in this template when reporting a bug, unless you know what you
+Description of Problem:
+I think mcs is mishandling the modifiers in this case. See this excerpt
+from the C# Language Specification.
+The declared accessibility of a member can be one of the following:
+ * Protected internal (meaning protected or internal), which is selected
+by including both a protected and an internal modifier in the member
+declaration. The intuitive meaning of protected internal is “access limited
+to this program or types derived from the containing class”.
+To be clearer, the last phrase may be complemented with: ', even if that
+derived class does not live in the same assembly.'
+The key concept here is that when using both modifiers we have an 'or'
+relationship not an 'and' relationship. I disagree with that text's writer
+about it being the 'intuitive meaning'...
+Steps to reproduce the problem:
+1. Define a method as protected internal in a class in one assembly/project
+2. Define a derived class in another assembly/project that tries to
+override the method. Reference the first assembly and compile.
+`System.Xml.XmlDataDocument.CreateNavigator': can't change the access
+modifiers when overriding inherited member `XmlDocument.CreateNavigator'
+How often does this happen?
+Always, I presume...