[Mono-bugs] [Bug 77509][Nor] New - [GMCS] CS0121 - a call is ambiguous between the base class and generic derived class

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Feb 9 10:08:58 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 atsushi at ximian.com.

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

--- shadow/77509	2006-02-09 10:08:58.000000000 -0500
+++ shadow/77509.tmp.31147	2006-02-09 10:08:58.000000000 -0500
@@ -0,0 +1,57 @@
+Bug#: 77509
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] CS0121 - a call is ambiguous between the base class and generic derived class
+
+The example code below fails to compile because of incorrectly computed
+ambiguity:
+
+using System;
+
+class DerivedGenericClass<T> : BaseClass // this <T> causes the bug
+{
+        public override void Foo () {}
+
+        public void Baz ()
+        {
+                Foo ();
+        }
+}
+
+abstract class BaseClass
+{
+        public abstract void Foo ();
+}
+
+
+Actual Results:
+
+foo.cs(9,3): error CS0121: The call is ambiguous between the following
+methods o
+r properties: `BaseClass.Foo()' and `DerivedGenericClass<T>.Foo()'
+foo.cs(15,23):: `BaseClass.Foo()', name of symbol related to previous error
+foo.cs(5,23):: `DerivedGenericClass<T>.Foo()', name of symbol related to
+previou
+s error
+Compilation failed: 1 error(s), 0 warnings
+
+Expected Results:
+
+no error other than CS5001 (entrypoint not found).
+
+How often does this happen? 
+
+consistently.


More information about the mono-bugs mailing list