[Mono-bugs] [Bug 72729][Nor] New - We allow non-fixed address taking of a ref param

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 18 Feb 2005 13:21:01 -0500 (EST)


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=72729

--- shadow/72729	2005-02-18 13:21:01.000000000 -0500
+++ shadow/72729.tmp.19783	2005-02-18 13:21:01.000000000 -0500
@@ -0,0 +1,37 @@
+Bug#: 72729
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: We allow non-fixed address taking of a ref param
+
+We compile this:
+
+using System;
+
+unsafe class X {
+	static void Main ()
+	{
+		int foo = 0;
+		Blah (ref foo);
+
+	}
+	
+	static void Blah (ref int mptr)
+	{
+		int* x = &mptr;
+	}
+}
+
+csc says that you must do it in a fixed context.