2006-04-26 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Wed, 26 Apr 2006 07:57:25 +0000 (07:57 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Wed, 26 Apr 2006 07:57:25 +0000 (07:57 -0000)
* MonoType.cs : (GetMethod) when zero-length type[] is explicitly
  passed, don't return methods with some arguments. Fixed bug #77367.

* TypeTest.cs : added test for bug #77367.

svn path=/trunk/mcs/; revision=59911

mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/MonoType.cs
mcs/class/corlib/Test/System/ChangeLog
mcs/class/corlib/Test/System/TypeTest.cs

index f8d60a2f076119c379e36cff6afdd87cd6bec0d9..a415613764899d2b639c51c5c0c1b09dc7539ca4 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-26  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * MonoType.cs : (GetMethod) when zero-length type[] is explicitly
+         passed, don't return methods with some arguments. Fixed bug #77367.
+
 2006-04-21  Gert Driesen  <drieseng@users.souceforge.net>
 
        * Enum.cs: Provide meaningful message when type of passed in value
index f79ab1ba41894e1bd8c1c7f5b23e0f3fdb496c3b..7199196da51c35f3f9bc869ab65b285e1fe4bd92 100644 (file)
@@ -199,7 +199,7 @@ namespace System
                        if (count == 0)
                                return null;
                        
-                       if (count == 1 && typesLen == 0
+                       if (count == 1 && types == null
                                return (MethodInfo) CheckMethodSecurity (found);
 
                        match = new MethodBase [count];
index 7a2748cc93610a004425e4a9cc25fb9e119dd4b8..a0caaea83c4967455914aafc03b826b8c82a471a 100644 (file)
@@ -1,3 +1,7 @@
+2006-04-26  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * TypeTest.cs : added test for bug #77367.
+
 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
 
        * EnvironmentTest.cs: Add tests for SetEnvironmentVariable.
index 0706139ad67ac9d171d2d23724e9636645f5333f..8f63b86df47e8b7bbb2d723d100183726dccfc7c 100644 (file)
@@ -527,6 +527,13 @@ PublicKeyToken=b77a5c561934e089"));
                        typeof (BindingFlags).GetConstructor (BindingFlags.Default, null, CallingConventions.Any, new Type[1] { null }, null);
                }
 
+               [Test]
+               public void GetMethod_Bug77367 ()
+               {
+                       MethodInfo i = typeof (Bug77367).GetMethod ("Run", Type.EmptyTypes);
+                       Assert.IsNull (i);
+               }
+
 #if NET_2_0
                [Test]
                public void FullNameGenerics ()
@@ -642,5 +649,12 @@ PublicKeyToken=b77a5c561934e089"));
 
                struct FooStruct {
                }
+
+               public class Bug77367
+               {
+                       public void Run (bool b)
+                       {
+                       }
+               }
        }
 }