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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +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>. +// [EMAIL PROTECTED] + +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; + } +} _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
