[Mono-bugs] [Bug 29601][Wis] Changed - Type.GetConstructor doesn't look at type inheritance for constructor signature

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
6 Sep 2002 10:31:20 -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=29601

--- shadow/29601	Tue Sep  3 08:30:16 2002
+++ shadow/29601.tmp.27682	Fri Sep  6 06:31:20 2002
@@ -1,13 +1,13 @@
 Bug#: 29601
 Product: Mono/Class Libraries
 Version: unspecified
 OS: Red Hat 7.3
 OS Details: 
-Status: NEW   
-Resolution: 
+Status: RESOLVED   
+Resolution: FIXED
 Severity: Unknown
 Priority: Wishlist
 Component: CORLIB
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: jonpryor@vt.edu               
 QAContact: mono-bugs@ximian.com
@@ -101,6 +101,33 @@
 
 ------- Additional Comments From gonzalo@ximian.com  2002-09-03 08:30 -------
 Not approved.
 
 We will use Binder to do it (once we have one).
 
+
+------- Additional Comments From lupus@ximian.com  2002-09-06 06:31 -------
+Please provide a working sample next time. I adapted yours to look like:
+    using System;
+    using System.IO;
+    using System.Reflection;
+    class Foo {
+            public Foo (TextWriter writer) { /* ... */ }
+    }
+    public class aci
+    {
+      public static void Main ()
+      {
+        Type t = typeof(Foo);
+        TextWriter w = new StringWriter();
+        Type[] args = new Type[1];
+        args[0] = w.GetType();
+        // args[0] = typeof(TextWriter);
+        ConstructorInfo ci = t.GetConstructor(args);
+        if (ci == null)
+          Console.WriteLine ("couldn't find constructor!");
+        else
+          Console.WriteLine ("found constructor: {0}", ci.ToString());
+      }
+    }
+
+This works in cvs (after the binder changes), so closing the bug.