[Mono-bugs] [Bug 52154][Nor] Changed - text.Chars is accepted by mcs

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 27 Apr 2004 23:21:57 -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 martin@ximian.com.

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

--- shadow/52154	2004-02-23 16:58:16.000000000 -0500
+++ shadow/52154.tmp.29943	2004-04-27 23:21:57.000000000 -0400
@@ -1,17 +1,17 @@
 Bug#: 52154
-Product: Mono/Compilers
+Product: Mono: Compilers
 Version: unspecified
 OS: other
 OS Details: 
 Status: NEW   
 Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: C#
-AssignedTo: mono-bugs@ximian.com                            
+AssignedTo: martin@ximian.com                            
 ReportedBy: lupus@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
 Summary: text.Chars is accepted by mcs
@@ -64,6 +64,31 @@
 If I was trying to get Chars property with code, I get 
 
 ** ERROR **: Invalid IL code at IL009b in .niisAMT:Main (string[]):
 IL_009b: callvirt  0x0a000003
 
 while run.
+
+------- Additional Comments From martin@ximian.com  2004-04-27 23:21 -------
+This has nothing to do with System.String, it's an Indexer problem:
+
+using System;
+using System.Runtime.CompilerServices;
+
+class A
+{
+	[IndexerName ("Foo")]
+	public int this [int index] {
+		get { return index; }
+	}
+
+	static int Test (A a)
+	{
+		return a.Foo;
+	}
+
+	public static void Main ()
+	{
+		Test (new A ());
+	}
+}
+