[Mono-bugs] [Bug 34797][Blo] New - mcs in mishandling the 'protected internal' case

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
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 rafaelteixeirabr@hotmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=34797

--- shadow/34797	Sat Nov 30 16:36:02 2002
+++ shadow/34797.tmp.21084	Sat Nov 30 16:36:02 2002
@@ -0,0 +1,58 @@
+Bug#: 34797
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: rafaelteixeirabr@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Summary: mcs in mishandling the 'protected internal' case
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+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
+and compile.
+2. Define a derived class in another assembly/project that tries to
+override the method. Reference the first assembly and compile.
+
+Actual Results:
+error CS0507:
+`System.Xml.XmlDataDocument.CreateNavigator': can't change the access
+modifiers when overriding inherited member `XmlDocument.CreateNavigator'
+
+Expected Results:
+Normal compilation
+
+How often does this happen? 
+Always, I presume...
+
+Additional Information: