[Mono-bugs] [Bug 82329][Maj] New - System.Type GetMethod should raise AmbiguousMatchException, but it doesn't.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Aug 6 06:12:20 EDT 2007
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 arek at forcom.com.pl.
http://bugzilla.ximian.com/show_bug.cgi?id=82329
--- shadow/82329 2007-08-06 06:12:20.000000000 -0400
+++ shadow/82329.tmp.13205 2007-08-06 06:12:20.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 82329
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: System
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: arek at forcom.com.pl
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: System.Type GetMethod should raise AmbiguousMatchException, but it doesn't.
+
+Description of Problem:
+
+typeof(DerivedClass).GetMethod("f") returns a method but it should raise
+System.Reflection.AmbiguousMatchException. There are two methods
+f in a base class, and one in derived one. It seems that mono works, as it
+was specified BindingFlags.DeclaredOnly flag, but it wasn't.
+
+Run sample app.
+
+Actual Results:
+On mono System.Type.GetMethod("f") returns a method.
+
+Expected Results:
+On Microsoft .NET runtime rises System.Reflection.AmbiguousMatchException
+
+class A
+{
+ public virtual void f(int i1, int i2) {}
+ public virtual void f(int i1, int i2, bool b) {}
+}
+
+class B : A
+{
+ public override void f(int i1, int i2, bool b) {}
+}
More information about the mono-bugs
mailing list