[Mono-bugs] [Bug 68790][Wis] Changed - mcs does not report error CS0197
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 26 Oct 2004 08:40: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 bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=68790
--- shadow/68790 2004-10-26 06:15:26.000000000 -0400
+++ shadow/68790.tmp.11787 2004-10-26 08:40:57.000000000 -0400
@@ -2,13 +2,13 @@
Product: Mono: Compilers
Version: unspecified
OS: Red Hat 9.0
OS Details: Linux
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Wishlist
Component: C#
AssignedTo: mono-bugs@ximian.com
ReportedBy: rkumar@novell.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -72,6 +72,46 @@
How often does this happen?
Always.
Additional Information:
If we don't inherit class A from MarshalByRefObject, CSC compiles the code
without any problem.
+
+------- Additional Comments From bmaurer@users.sf.net 2004-10-26 08:40 -------
+Ugh, thats nasty. What is happening is that the following code:
+
+a.point.IsEmpty
+
+needs to compile into
+
+ldloc a
+ldflda point
+call IsEmpty
+
+Because value types always get their methods called with the argument
+being byref.
+
+One interesting point, what happens if you say
+a.point.x
+
+where a is a MBRO, point a value-type and x a field. In the code, it
+would look like:
+
+ldloc a
+ldflda point
+ldfld x
+
+However, you can't do `ldfld'
+
+I have the feeling that in this case, msft would copy point into a
+local so that you could do the correct thing.
+
+Another question: if you have
+
+struct X {
+ static X Foo { get {...} }
+ int Y { get { return y; }}
+ static int y;
+}
+
+And say X.Foo.Y, will it allow that? The return value from X.Foo can
+not be passed byref.