Bugzilla – Bug 318905
[GMCS] Class1.cs(15,7): error CS1503: Argument 1: Cannot convert from `System.Guid' to `TKey'
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by awaddell@fnfr.com 2005-09-06 20:42:12 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: Compiler seems to be getting real types confused wiht meta-types (correct terminology?). Worked in 1.1.8, broken in 1.1.9. Steps to reproduce the problem: 1. Try compiling: using System; using System.Collections.Generic; using System.Text; namespace ClassLibrary3 { public class Dictionary1<TKey, TValue> : Dictionary<TKey, TValue> { } public class Test { Dictionary1<Guid, String> _D = new Dictionary1<Guid, string>(); void testMethod() { _D.Add(Guid.NewGuid(), "foo"); } } } 2. 3. Actual Results: [awaddell@AWLNX ClassLibrary3]$ make gmcs -target:library -optimize- -noconfig -nowarn:1691,169 -out:ClassLibrary3.dll -define:MONO -define:DEBUG -define:TRACE -reference:System -reference:System.Data -reference:System.Xml Class1.cs Properties/AssemblyInfo.cs Class1.cs(15,7): error CS1502: The best overloaded method match for `System.Collections.Generic.Dictionary<TKey,TValue>.Add(TKey, TValue)' has some invalid arguments Class1.cs(15,7): error CS1503: Argument 1: Cannot convert from `System.Guid' to `TKey' Compilation failed: 2 error(s), 0 warnings Expected Results: Clean compile. How often does this happen? Always. Additional Information: ---- Additional Comments From martin@ximian.com 2005-10-04 14:53:34 MST ---- Fixed in SVN. Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Linux AWLNX.fnfr.com 2.4.21-20.EL #1 Wed Aug 18 20:58:25 EDT 2004 i686 i686 i386 GNU/Linux</cf_op_sys_details>