[Mono-bugs] [Bug 76092][Nor] New - Bug in compilation of generic type usage

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 13 16:42:39 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 spigaz at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76092

--- shadow/76092	2005-09-13 16:42:39.000000000 -0400
+++ shadow/76092.tmp.16044	2005-09-13 16:42:39.000000000 -0400
@@ -0,0 +1,82 @@
+Bug#: 76092
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: Linux
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: spigaz at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Bug in compilation of generic type usage 
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Problem matching the same generic type using diferent paths when the base
+type is in a diferent assembly. When is inside the same assembly there is
+no problem.
+
+Steps to reproduce the problem:
+1. Insert into a file:
+	public class A<T> where T : B
+	{
+	}
+	
+	public class B
+	{
+	}
+	
+	public class C<T> where T : B
+	{
+		public A<T> A
+		{
+			get
+			{
+				return null;
+			}
+		}
+	}
+2. Compile it as a dll.
+3. Insert into a file
+	public static class Bug
+	{
+		public static void Execute<T>(C1<T> versioned) where T : B1
+		{
+			A<T> a = versioned.A;
+			
+			System.Console.WriteLine(a);
+		}
+	}
+	
+	public class B1 : B
+	{	
+	}
+	
+	public class C1<T> : C<T> where T : B1
+	{
+	}
+4. Try to compile it using the other assembly as reference.
+
+
+Actual Results:
+Main.cs(7) error CS0029: Cannot implicitly convert type `A<T>' to `A<T>'
+Main.cs(7) The type A`1 has two conflicting definitions, one comes from
+FLMID.Bugs.GenericsThreeAux, Version=0.0.0.0, Culture=neutral and the other
+from FLMID.Bugs.GenericsThreeAux, Version=0.0.0.0, Culture=neutralerror
+
+
+Expected Results:
+It should compile fine.
+
+How often does this happen? 
+Always
+
+Additional Information:
+Tested with mono 1.1.9


More information about the mono-bugs mailing list