[Mono-bugs] [Bug 75412][Min] New - indexers always treated as public
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Jun 28 16:05:47 EDT 2005
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 danw at novell.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75412
--- shadow/75412 2005-06-28 16:05:47.000000000 -0400
+++ shadow/75412.tmp.8803 2005-06-28 16:05:47.000000000 -0400
@@ -0,0 +1,38 @@
+Bug#: 75412
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: danw at novell.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: indexers always treated as public
+
+If you define an indexer on a class, it is treated as public (or maybe
+internal?) regardless of its actual protection level.
+
+ using System;
+
+ public class Foo {
+ private int this[int index] { get { return index; } }
+ }
+
+ public class Bar {
+ public static void Main ()
+ {
+ Foo foo = new Foo ();
+ Console.WriteLine (foo[5]);
+ }
+ }
+
+danw at twelve-monkeys:libstetic> mcs -out:/tmp/index.exe /tmp/index.cs
+danw at twelve-monkeys:libstetic> mono /tmp/index.exe
+5
More information about the mono-bugs
mailing list