[Mono-bugs] [Bug 75896][Nor] New - 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
Wed Aug 24 10:13:25 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 atsushi at ximian.com.

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

--- shadow/75896	2005-08-24 10:13:25.000000000 -0400
+++ shadow/75896.tmp.15443	2005-08-24 10:13:25.000000000 -0400
@@ -0,0 +1,54 @@
+Bug#: 75896
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs does not report CS0131: struct member on left hand side is incorrectly allowed
+
+If the left side of an assignment is a member of struct, it should be
+treated as error.
+
+Repro ----
+
+using System;
+
+public struct Test
+{
+        public string Foo {
+                get { return "foo"; }
+                set { }
+        }
+}
+
+public class Driver
+{
+        public static void Main ()
+        {
+                new Test ().Foo = "hoge";
+        }
+}
+
+
+Actual Results:
+
+No error reported.
+
+Expected Results:
+
+struct_setter.cs(15,3): error CS0131: The left-hand side of an assignment
+must be a variable, property or indexer
+
+How often does this happen? 
+
+consistently.


More information about the mono-bugs mailing list