[Mono-bugs] [Bug 68582][Nor] New - Type.IsValueType is incorrect for ref parameters

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 20 Oct 2004 12:08:17 -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 priewasser@gmx.at.

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

--- shadow/68582	2004-10-20 12:08:17.000000000 -0400
+++ shadow/68582.tmp.1429	2004-10-20 12:08:17.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 68582
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: priewasser@gmx.at               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Type.IsValueType is incorrect for ref parameters
+
+Description of Problem:
+Type.IsValueType returns true if Type.MemberType of a ref (or out) 
+parameter is a value type.
+
+
+Steps to reproduce the problem:
+Run this test case:
+
+using System;
+using System.Reflection;
+
+public class Test{
+	public void Foo(ref int i){
+	}
+	public static void Main(){
+		Type t=typeof(Test);
+		MethodInfo mi=t.GetMethod("Foo");
+		Type paramType=mi.GetParameters()[0].ParameterType;
+		Console.WriteLine(paramType.IsValueType);
+	}
+}
+
+
+Actual Results:
+true
+
+
+Expected Results:
+false