[Mono-bugs] [Bug 75896][Cos] Changed - mcs does not report CS0131: struct member on left hand side is incorrectly allowed

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Feb 24 13:50:45 EST 2006

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 faceprint at faceprint.com.


--- shadow/75896	2005-08-24 12:41:16.000000000 -0400
+++ shadow/75896.tmp.26975	2006-02-24 13:50:45.000000000 -0500
@@ -62,6 +62,22 @@
 ------- Additional Comments From atsushi at ximian.com  2005-08-24 12:41 -------
 Ah yes. It is not an error if the left side struct is a variable.
 Setting priority as cosmetic since it would really happen in a
 practical code.
+------- Additional Comments From faceprint at faceprint.com  2006-02-24 13:50 -------
+Hashtable h = new Hashtable();
+/* ... */
+foreach (DictionaryEntry e in h)
+	e.Value = 42;  //this doesn't change anything in the hashtable
+This is a real life example where the MS compiler spits out CS0131,
+and prevents you from doing something that actually has no effect. 
+I'm not sure if this warrants a higher priority or not.

More information about the mono-bugs mailing list