Bug 318866 (MONO75957) - [GMCS] [PATCH] error CS1503: Argument 1: Cannot convert from `T' to `T'
Summary: [GMCS] [PATCH] error CS1503: Argument 1: Cannot convert from `T' to `T'
Status: RESOLVED FIXED
Alias: MONO75957
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Red Hat 9.0
: P3 - Medium : Major
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-02 05:13 UTC by Andy Waddell
Modified: 2007-09-15 21:24 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
proposed fix (1.31 KB, patch)
2005-09-02 14:07 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:29:13 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>