[Mono-bugs] [Bug 30444][Nor] New - mcs compiles static access from instance object variable

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
17 Sep 2002 02:44:30 -0000


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 ndrochak@gol.com.

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

--- shadow/30444	Mon Sep 16 22:44:30 2002
+++ shadow/30444.tmp.4102	Mon Sep 16 22:44:30 2002
@@ -0,0 +1,45 @@
+Bug#: 30444
+Product: Mono/MCS
+Version: unspecified
+OS: Red Hat 7.2
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ndrochak@gol.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs compiles static access from instance object variable
+
+I don't know if mcs will allow this in all circumstances, but at least in 
+this one case it does.  I don't have a nice simple test case, but what I 
+do have is a patch I had to make to get the compile of mcs to work on 
+windows:
+
+Index: mcs/parameter.cs
+===================================================================
+RCS file: /cvs/public/mcs/mcs/parameter.cs,v
+retrieving revision 1.39
+diff -u -r1.39 parameter.cs
+--- mcs/parameter.cs    14 Sep 2002 13:19:57 -0000      1.39
++++ mcs/parameter.cs    16 Sep 2002 03:40:49 -0000
+@@ -86,7 +86,7 @@
+
+                public ParameterAttributes Attributes {
+                        get {
+-                               int flags = ((int) ModFlags) & ~((int)
+ModFlags.ISBYREF);
++                               int flags = ((int) ModFlags) & ~((int)
+Parameter.Modifier.ISBYREF);
+                                switch ((Modifier) flags) {
+                                case Modifier.NONE:
+                                        return ParameterAttributes.None;
+===================================================================
+
+Notice the use of the static member ISBYREF on the instance object 
+variable ModFlags.  Mcs did not report this as an error.  Csc did.