[Mono-bugs] [Bug 77712][Nor] New - [GMCS] incorrect CS0121 - call to base overriden methods are said ambiguous

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Mar 6 01:41:56 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=77712

--- shadow/77712	2006-03-06 01:41:56.000000000 -0500
+++ shadow/77712.tmp.11476	2006-03-06 01:41:56.000000000 -0500
@@ -0,0 +1,66 @@
+Bug#: 77712
+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] incorrect CS0121 - call to base overriden methods are said ambiguous
+
+gmcs is confused and reports ambiguity for call to an overriden base method
+among further base methods.
+
+--------
+class Foo<T>
+{
+        internal virtual void Hoge (T obj)
+        {
+        }
+}
+
+class Bar<T> : Foo<T>
+{
+        internal override void Hoge (T obj)
+        {
+        }
+}
+
+class Baz : Bar<string>
+{
+        internal override void Hoge (string obj)
+        {
+                base.Hoge (obj);
+        }
+}
+
+Actual Results:
+
+override-override-override.cs(19,8): error CS0121: The call is ambiguous
+between the following methods or properties: `Foo<string>.Hoge(in string)'
+and `Bar<string>.Hoge(in string)'
+override-override-override.cs(3,24):: `Foo<T>.Hoge(T)', name of symbol
+related to previous error
+override-override-override.cs(10,25):: `Bar<T>.Hoge(T)', name of symbol
+related to previous error
+Compilation failed: 1 error(s), 0 warnings
+
+Expected Results:
+
+no CS0121 error.
+
+How often does this happen? 
+
+consistently.
+
+Additional Information:
+
+It still happens when you replace "string" with a generic type argument.


More information about the mono-bugs mailing list