[Mono-bugs] [Bug 76003][Maj] New - [GMCS] Class1.cs(15, 7): error CS1503: Argument 1: Cannot convert from `System.Guid' to `TKey'

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 6 20:42:12 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=76003

--- shadow/76003	2005-09-06 20:42:12.000000000 -0400
+++ shadow/76003.tmp.12527	2005-09-06 20:42:12.000000000 -0400
@@ -0,0 +1,69 @@
+Bug#: 76003
+Product: Mono: Compilers
+Version: 1.1
+OS: Red Hat 7.0
+OS Details: Linux AWLNX.fnfr.com 2.4.21-20.EL #1 Wed Aug 18 20:58:25 EDT 2004 i686 i686 i386 GNU/Linux
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: awaddell at fnfr.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS]  Class1.cs(15,7): error CS1503: Argument 1: Cannot convert from `System.Guid' to `TKey'
+
+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 at 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:


More information about the mono-bugs mailing list