[Mono-bugs] [Bug 75169][Wis] New - gmcs fails to detect that method type parameters are supplied

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jun 7 06:13:56 EDT 2005


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 malekith at pld-linux.org.

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

--- shadow/75169	2005-06-07 06:13:55.000000000 -0400
+++ shadow/75169.tmp.13121	2005-06-07 06:13:55.000000000 -0400
@@ -0,0 +1,45 @@
+Bug#: 75169
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: amd64 pld linux
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: malekith at pld-linux.org               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: gmcs fails to detect that method type parameters are supplied
+
+Please try to compile:
+
+class Fun<A,B> {}
+
+class List<T> {
+  public List<T2> Map<T2> (Fun<T,T2> x)
+  {
+    return new List<T2>();
+  }
+
+  public void foo<T2> ()
+  {
+    (new List<T2> ()).Map<T> (new Fun<T2,T> ());
+  }
+}
+
+
+It fails with
+
+foo.cs(11) error CS0411: The type arguments for method `Map' cannot be
+infered from the usage. Try specifying the type arguments explicitly.
+
+But clearly type parameters are specified.
+
+This works with ms.net beta1 csc.
+
+I'm using svn trunk.


More information about the mono-bugs mailing list