Bugzilla – Bug 318866
[GMCS] [PATCH] error CS1503: Argument 1: Cannot convert from `T' to `T'
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by awaddell@fnfr.com 2005-09-01 22:13:32 MST ---- 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@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@AWLNX ClassLibrary2]$ /opt/latest/bin/gmcs --version Mono C# compiler version 1.1.9.0 [awaddell@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@AWLNX ClassLibrary2]$ Expected Results (from 1.1.8 release): [awaddell@AWLNX ClassLibrary2]$ /usr/local/bin/mcs --version Mono C# compiler version 1.1.8.0 [awaddell@AWLNX ClassLibrary2]$ /usr/local/bin/gmcs --version Mono C# compiler version 1.1.5.0 [awaddell@AWLNX ClassLibrary2]$ /usr/local/bin/gmcs -target:library Class1.cs [awaddell@AWLNX ClassLibrary2]$ How often does this happen? Always. Additional Information: ---- Additional Comments From atsushi@ximian.com 2005-09-02 07:07:34 MST ---- Created an attachment (id=168453) proposed fix ---- Additional Comments From martin@ximian.com 2005-09-05 11:37:17 MST ---- Patch is ok, already tested. ---- Additional Comments From atsushi@ximian.com 2005-09-05 12:13:25 MST ---- fixed in svn (r49480). Imported an attachment (id=168453) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Red Hat Enterprise Linux WS release 3 (Taroon Update 3)</cf_op_sys_details>