Bug 318330 (MONO75337) - [GMCS] Ugly warning.
Summary: [GMCS] Ugly warning.
Status: RESOLVED FIXED
Alias: MONO75337
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-21 07:22 UTC by Miguel de Icaza
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:22:39 UTC


---- Reported by miguel@ximian.com 2005-06-21 00:22:39 MST ----

Hello,

   The following test case shows an ugly warning, the code for generics
should specialize the method for reporting this error and provide something
more meaningful:

class LinkedList<T> {
	public T value;
	public LinkedList<T> next;

	public LinkedList (T value, LinkedList<T> next)
	{
		this.value = value;
		this.next = next;
	}

	public LinkedList (T value)
	{
		this.next = null;
		this.value = value;
	}
}
	
class X {
	static void Main ()
	{
		LinkedList<object> x = new LinkedList<string> ("Hello");
	}
}



---- Additional Comments From miguel@ximian.com 2005-06-21 00:31:01 MST ----

It should report instead:

`Can not implicitly convert type LinkedList<string> into
LinkedList<object>'



---- Additional Comments From martin@ximian.com 2005-06-21 06:19:33 MST ----

Trivial one-line fix; done.


Unknown operating system unknown. Setting to default OS "Other".