[Mono-bugs] [Bug 46907][Nor] New - Compiles invalid program: compound assignment
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Fri, 25 Jul 2003 09:31:42 -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 miguel@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=46907
--- shadow/46907 Fri Jul 25 09:31:42 2003
+++ shadow/46907.tmp.23285 Fri Jul 25 09:31:42 2003
@@ -0,0 +1,33 @@
+Bug#: 46907
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: miguel@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Compiles invalid program: compound assignment
+
+The Mono C# compiler compiles this invalid program:
+
+using System.Collections;
+
+class X {
+ static Hashtable h = new Hashtable ();
+
+ static void Main ()
+ {
+ ArrayList l = h ["hola"] = new ArrayList ();
+ }
+}
+
+The result value from h ["hola"] is an object, not an ArrayList (I guess
+our compiler inferencing type is that good) :-)