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=78104 --- shadow/78104 2006-04-25 22:41:31.000000000 -0400 +++ shadow/78104.tmp.28753 2006-07-13 23:50:45.000000000 -0400 @@ -1,13 +1,13 @@ Bug#: 78104 Product: Mono: Compilers Version: 1.1 OS: All OS Details: windows xp, GNU/Linux (gentoo) -Status: RESOLVED -Resolution: FIXED +Status: REOPENED +Resolution: Severity: Unknown Priority: Normal Component: C# AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] @@ -73,6 +73,36 @@ - The example code should result in an error. IEnumerable<T> is in System.Collections.Generic which is not referenced. - The latest mcs in svn(trunk) does not raise such an error, so if there was such a problem it is already fixed. - This bug is absolutely not a critical one. + +------- Additional Comments From [EMAIL PROTECTED] 2006-07-13 23:50 ------- +The correct code also crashes gmcs: + +using System; +using System.Collections; + +class NeedDispose: IDisposable +{ + public void Dispose() { } +} + +public class IterTest : IEnumerable +{ + public IEnumerator GetEnumerator() + { + using (new NeedDispose()) { + yield return "a"; + yield return "b"; + } + } + + public static void Main() + { + foreach (string s in new IterTest()) + Console.WriteLine(s); + } +} + +Both generic and non-generic version of IEnumerator will crashes. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
