[Mono-bugs] [Bug 49704][Nor] New - internal class invalidly allowed for protected method argument
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 15 Oct 2003 14:09:23 -0400 (EDT)
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 ginga@kit.hi-ho.ne.jp.
http://bugzilla.ximian.com/show_bug.cgi?id=49704
--- shadow/49704 2003-10-15 14:09:23.000000000 -0400
+++ shadow/49704.tmp.20880 2003-10-15 14:09:23.000000000 -0400
@@ -0,0 +1,63 @@
+Bug#: 49704
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ginga@kit.hi-ho.ne.jp
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: internal class invalidly allowed for protected method argument
+
+When an internal class appears as a parameter of a protected method, then
+it should be reported as an error, but mcs does not complain about it.
+For example, such class:
+
+public class Test
+{
+ public static void Main ()
+ {
+ }
+}
+
+internal class InternalFoo
+{
+ public string Foo;
+}
+
+public class PublicBar
+{
+ protected void Bar (InternalFoo foo)
+ {
+ }
+}
+
+Actual Results:
+
+$ mcs internal.cs
+Compilation succeeded
+
+Expected Results:
+
+$ csc internal.cs
+Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
+for Microsoft (R) .NET Framework version 1.1.4322
+Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.
+
+internal.cs(16,17): error CS0051: Inconsistent accessibility: parameter
+type
+ 'InternalFoo' is less accessible than method
+ 'PublicBar.Bar(InternalFoo)'
+internal.cs(9,16): (Location of symbol related to previous error)
+
+
+How often does this happen?
+
+-> Always.