[Mono-bugs] [Bug 26496][Nor] New - passing this of a valuetype to a method that takes the value, not the address
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
19 Jun 2002 20:48:06 -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 lupus@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=26496
--- shadow/26496 Wed Jun 19 16:48:06 2002
+++ shadow/26496.tmp.19020 Wed Jun 19 16:48:06 2002
@@ -0,0 +1,34 @@
+Bug#: 26496
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: lupus@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: passing this of a valuetype to a method that takes the value, not the address
+
+The following test is compiled wrong by mcs (it gets three() right, but
+one() is compiled wrong): it passes this (a pointer) when it should pass a
+value, ie.e ldarg.0 ldobj T.
+struct T {
+ int val;
+ void one () {
+ two (this);
+ }
+ void two (T t) {
+ }
+ void three (ref T t) {
+ two (t);
+ }
+ static void Main() {
+ }
+}