[Mono-bugs] [Bug 77954][Nor] New - [GMCS] incorrect CS0121 -
ambiguity between generic method definition and generic
method instance in different assembly
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Mar 29 17:08:26 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=77954
--- shadow/77954 2006-03-29 17:08:26.000000000 -0500
+++ shadow/77954.tmp.9253 2006-03-29 17:08:26.000000000 -0500
@@ -0,0 +1,75 @@
+Bug#: 77954
+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:
+Summary: [GMCS] incorrect CS0121 - ambiguity between generic method definition and generic method instance in different assembly
+
+gmcs fails to compile such code that invokes generic method in referenced
+assembly, because of incorrect ambiguity error (CS0121). It happens between
+generic method definition and generic method, only when those methods are
+defined in different assembly.
+
+$ cat zzz.cs
+public class A : X
+{
+ public override void Whoa<T> (object arg)
+ {
+ }
+}
+
+public abstract class X
+{
+ // virtual is also buggy
+ public abstract void Whoa<T> (object arg);
+}
+
+$ cat yyy.cs
+class Test
+{
+ public void Foo ()
+ {
+ A x = new A ();
+ x.Whoa<int> (null);
+ }
+}
+
+Steps to reproduce the problem:
+1. gmcs -t:library zzz.cs
+2. gmcs yyy.cs -r:zzz.dll
+
+Actual Results:
+
+$ gmcs yyy.cs -r:zzz.dll
+yyy.cs(6,3): error CS0121: The call is ambiguous between the following
+methods o
+r properties: `X.Whoa<Int32>(object)' and `X.Whoa<T>(object)'
+C:\cygwin\home\atsushi\tests\gmcs-bugs\zzz.dll: `X.Whoa<Int32>(object)',
+name of
+ symbol related to previous error
+C:\cygwin\home\atsushi\tests\gmcs-bugs\zzz.dll: `X.Whoa<T>(object)', name
+of sym
+bol 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 is also recent regression which started to happen this month or last month.
More information about the mono-bugs
mailing list