[Mono-bugs] [Bug 77158][Maj] New - [GMCS] The constraint on T seems not to be copied tothe class generated for the iterator method Merge<T>.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jan 4 12:49:52 EST 2006


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 miguel at ximian.com.

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

--- shadow/77158	2006-01-04 12:49:52.000000000 -0500
+++ shadow/77158.tmp.30365	2006-01-04 12:49:52.000000000 -0500
@@ -0,0 +1,37 @@
+Bug#: 77158
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: miguel at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] The constraint on T seems not to be copied tothe class generated for the iterator method Merge<T>.
+
+The following program should compile, it does not:
+
+// Compiler bug (gmcs): The constraint on T seems not to be copied to
+// the class generated for the iterator method Merge<T>.
+// sestoft at dina.kvl.dk 
+
+using System;
+using System.Collections.Generic;
+
+public class H {
+  public static void Main(String[] args) { }
+
+  public static IEnumerable<T> Merge<T>(IEnumerator<T> xEtor) 
+    where T : IComparable<T>
+  {
+    int order = xEtor.Current.CompareTo(xEtor.Current);
+    yield return xEtor.Current;
+  }
+}


More information about the mono-bugs mailing list