[Mono-bugs] [Bug 75957][Maj] New - [GMCS] error CS1503: Argument 1: Cannot convert from `T' to `T'

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Sep 1 22:13:33 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 awaddell at fnfr.com.

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

--- shadow/75957	2005-09-01 22:13:33.000000000 -0400
+++ shadow/75957.tmp.30857	2005-09-01 22:13:33.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 75957
+Product: Mono: Compilers
+Version: 1.1
+OS: Red Hat 9.0
+OS Details: Red Hat Enterprise Linux WS release 3 (Taroon Update 3)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: awaddell at fnfr.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS]  error CS1503: Argument 1: Cannot convert from `T' to `T'
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+gmcs emmitting an error where I don't belive there should be one.  Older
+version (with the 1.1.8 release) did not have the problem.
+Code:
+[awaddell at AWLNX ClassLibrary2]$ more Class1.cs 
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ClassLibrary2
+{
+        public class List1<T> : List<T>
+        { }
+
+        public class List2<T>
+        {
+                private List1<T> _List = new List1<T>();
+                public void AddItem(T item)
+                {
+                        _List.Add(item);
+                }
+        }
+}
+ 
+
+Steps to reproduce the problem:
+1. gmcs -target:library Class1.cs
+2. 
+3. 
+
+Actual Results (from current tree 9/1/2005):
+[awaddell at AWLNX ClassLibrary2]$ /opt/latest/bin/gmcs --version
+Mono C# compiler version 1.1.9.0
+[awaddell at AWLNX ClassLibrary2]$ /opt/latest/bin/gmcs -target:library Class1.cs 
+Class1.cs(15) error CS1502: The best overloaded method match for
+`System.Collections.Generic.List<T>.Add(T)' has some invalid arguments
+Class1.cs(15) error CS1503: Argument 1: Cannot convert from `T' to `T'
+Compilation failed: 2 error(s), 0 warnings
+[awaddell at AWLNX ClassLibrary2]$ 
+
+Expected Results (from 1.1.8 release):
+[awaddell at AWLNX ClassLibrary2]$ /usr/local/bin/mcs --version
+Mono C# compiler version 1.1.8.0
+[awaddell at AWLNX ClassLibrary2]$ /usr/local/bin/gmcs --version
+Mono C# compiler version 1.1.5.0
+[awaddell at AWLNX ClassLibrary2]$ /usr/local/bin/gmcs -target:library Class1.cs 
+[awaddell at AWLNX ClassLibrary2]$ 
+
+How often does this happen? 
+Always.
+
+Additional Information:


More information about the mono-bugs mailing list