[Mono-bugs] [Bug 62552][Nor] Changed - stobj problem with generic program

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 5 Aug 2004 11:23:18 -0400 (EDT)


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 martin@ximian.com.

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

--- shadow/62552	2004-08-05 11:22:32.000000000 -0400
+++ shadow/62552.tmp.11370	2004-08-05 11:23:18.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 62552
 Product: Mono: Runtime
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: martin@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -38,6 +38,40 @@
 	{
 		List<Foo<int>> list = new List <Foo<int>> ();
 		foreach (Foo<int> foo in list)
 			;
 	}
 }
+
+------- Additional Comments From martin@ximian.com  2004-08-05 11:23 -------
+Another test case is this:
+using System;
+using System.Collections.Generic;
+
+class MyList<T> : IEnumerable<T>
+{
+	public IEnumerator<T> GetEnumerator ()
+	{
+		yield break;
+	}
+}
+
+struct Foo<T>
+{
+	public readonly T Data;
+  
+	public Foo (T data)
+	{
+		this.Data = data;
+	}
+}
+
+class X
+{
+	static void Main ()
+	{
+		MyList<Foo<int>> list = new MyList <Foo<int>> ();
+		foreach (Foo<int> foo in list)
+			;
+	}
+}
+