[Mono-bugs] [Bug 67689][Nor] Changed - Missing warning CS0278 - "doesn't implement the 'collection' pattern"

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 30 Apr 2005 08:04:50 -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.


--- shadow/67689	2004-10-09 14:54:36.000000000 -0400
+++ shadow/67689.tmp.20634	2005-04-30 08:04:50.000000000 -0400
@@ -11,13 +11,13 @@
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: rodolfocampero@hotmail.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
-Summary: mcs compiles program w/ambiguous call between 2 GetEnumerator
+Summary: Missing warning CS0278 - "doesn't implement the 'collection' pattern"
 Description of Problem:
 mcs compiles the following program, which is rejected by Microsoft .NET 
@@ -103,6 +103,30 @@
 Note that in both sample programs, mcs always uses GetEnumerator from 
 System.Collections.IEnumerator within the foreach statement, as does csc 
 for the second one.
+------- Additional Comments From martin@ximian.com  2005-04-30 08:04 -------
+The expected behavior is wrong.
+The second example compiles and works fine with mcs and csc.
+The first example is supposed to compile without any errors (as it
+does with mcs), but it should report a warning:
+martin@mordor ~
+$ csc J.cs
+Microsoft (R) Visual C# 2005 Compiler version 8.00.50215.44
+for Microsoft (R) Windows (R) 2005 Framework version 2.0.50215
+Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
+J.cs(26,25): warning CS0278: 'Testing.IMixedEnumerable' does not
+implement the 'collection' pattern.
+'System.Collections.IEnumerable.GetEnumerator()' is ambiguous with
+c:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\mscorlib.dll: (Location
+of symbol related to previous warning)
+J.cs(6,29): (Location of symbol related to previous warning)