[Mono-bugs] [Bug 77160][Nor] New - Property Invocation of Generic Type fails

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jan 4 14:18:53 EST 2006


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 spigaz at gmail.com.

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

--- shadow/77160	2006-01-04 14:18:53.000000000 -0500
+++ shadow/77160.tmp.1212	2006-01-04 14:18:53.000000000 -0500
@@ -0,0 +1,74 @@
+Bug#: 77160
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: spigaz at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Property Invocation of Generic Type fails
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. Insert into an a file
+using System.Reflection;
+using System;
+
+public static class MainBug
+{
+	public static void Main(string[] args)
+	{
+		object instance = new A<string>();
+		
+		Type type = instance.GetType();
+		
+		PropertyInfo property = type.GetProperty("Property");
+		
+		System.Console.WriteLine(property.GetValue(instance, null));
+	}
+}
+public class A<T> 
+{
+	public int Property
+	{
+		get
+		{
+			return -1;
+		}
+	}
+}
+2. Compile it
+3. Run it.
+
+Actual Results:
+Unhandled Exception: System.Reflection.TargetException: Unable to invoke an
+invalid target.
+in <0x00000> <unknown method>
+in (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
+(object,object[])
+in [0x00044] (at
+/software/mono/mono.2006.01.03/mcs/class/corlib/System.Reflection/MonoMethod.cs:127)
+System.Reflection.MonoMethod:Invoke (System.Object obj, BindingFlags
+invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
+System.Globalization.CultureInfo culture)
+
+Expected Results:
+-1
+
+How often does this happen? 
+Always
+
+Additional Information:
+Its a regression it worked before. And it still works on 1.1.10.1.


More information about the mono-bugs mailing list