Bug 318905 (MONO76003) - [GMCS] Class1.cs(15,7): error CS1503: Argument 1: Cannot convert from `System.Guid' to `TKey'
Summary: [GMCS] Class1.cs(15,7): error CS1503: Argument 1: Cannot convert from `Syste...
Status: RESOLVED FIXED
Alias: MONO76003
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Red Hat 7.0
: P3 - Medium : Major
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-07 03:42 UTC by Andy Waddell
Modified: 2007-09-15 21:24 UTC (History)
0 users

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


Attachments

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:37 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>