[Mono-bugs] [Bug 79241][Nor] New - GMCS: Params broken on generic methods.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Aug 31 18:34:40 EDT 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 timhaughton at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=79241
--- shadow/79241 2006-08-31 18:34:40.000000000 -0400
+++ shadow/79241.tmp.7466 2006-08-31 18:34:40.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 79241
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details: Ubuntu / Dapper
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: timhaughton at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Summary: GMCS: Params broken on generic methods.
+
+Running 1.1.17 on Ubuntu Dapper, using the gmcs compiler.
+
+There seems to be a problem with the params keyword on generic methods
+across assembly boundaries.
+
+Steps. Start with the following .cs file:
+
+using System;
+
+public class Callee
+{
+ public T Foo<T>(params object[] args) where T : class, new()
+ {
+ return new T();
+ }
+}
+
+class Caller
+{
+ public static void Main(string[] args)
+ {
+ Callee mc = new Callee();
+ mc.Foo<string>( "5", 5 );
+ }
+}
+
+All builds OK.
+
+Now move the class called 'Callee' to another assembly, reference it and
+rebuild. I now get this error:
+
+error CS1501: No overload for method `Foo' takes `2' arguments
More information about the mono-bugs
mailing list