[prev in list] [next in list] [prev in thread] [next in thread]
List: mono-patches
Subject: [Mono-patches] r67186 - trunk/mcs/errors
From: "Marek Safar (marek.safar () seznam ! cz)"
Date: 2006-10-31 20:13:35
Message-ID: 20061031201335.1074E9472C () mono-cvs ! ximian ! com
[Download RAW message or body]
Author: marek
Date: 2006-10-31 15:13:34 -0500 (Tue, 31 Oct 2006)
New Revision: 67186
Added:
trunk/mcs/errors/cs0278.cs
Log:
New test.
Added: trunk/mcs/errors/cs0278.cs
===================================================================
--- trunk/mcs/errors/cs0278.cs 2006-10-31 20:12:25 UTC (rev 67185)
+++ trunk/mcs/errors/cs0278.cs 2006-10-31 20:13:34 UTC (rev 67186)
@@ -0,0 +1,31 @@
+// CS0278: `Testing.IMixedEnumerable' contains ambiguous implementation of \
`enumerable' pattern. Method `Testing.ICustomEnumerable.GetEnumerator()' is ambiguous \
with method `System.Collections.IEnumerable.GetEnumerator()' +// Line: 28
+// Compiler options: -warnaserror -warn:2
+
+using System;
+using System.Collections;
+
+namespace Testing {
+ interface ICustomEnumerable {
+ IEnumerator GetEnumerator();
+ }
+
+ interface IMixedEnumerable : IEnumerable, ICustomEnumerable {}
+
+ class TestCollection : IMixedEnumerable {
+ IEnumerator IEnumerable.GetEnumerator() {
+ return null;
+ }
+
+ IEnumerator ICustomEnumerable.GetEnumerator() {
+ return null;
+ }
+ }
+
+ class Test {
+ public static void Main(string[] args) {
+ IMixedEnumerable c = new TestCollection();
+ foreach(object o in c) {}
+ }
+ }
+}
\ No newline at end of file
_______________________________________________
Mono-patches maillist - Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic