https://bugzilla.novell.com/show_bug.cgi?id=660077
https://bugzilla.novell.com/show_bug.cgi?id=660077#c0 Summary: CS1640 error that is not present in MS.NET Classification: Mono Product: Mono: Compilers Version: 2.8.x Platform: x86 OS/Version: Linux Status: NEW Severity: Normal Priority: P5 - None Component: C# AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Created an attachment (id=405237) --> (http://bugzilla.novell.com/attachment.cgi?id=405237) Testcase files User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 Safari/534.10 As I was trying to compile the codebase of EVEMon (http://evemon.battleclinic.com/) using MonoDevelop (primarily to figure out if there was any hope of it compiling on Mono), I ran into what I believe to be a bug in the C# compiler. I've condensed it into a small test case which I have attached, and confirmed that the error does not happen on MS.NET (using the compiler that comes with VS2010). The error does not happen if the code is compiled as a single exe, or if the GlobalMonitoredCharacterCollection class definition is moved over to "test.cs" Reproducible: Always Steps to Reproduce: 1. Attempt to compile the attached files with the following commandline: mcs /target:library /out:lib.dll lib.cs mcs /r:lib.dll test.cs 2. Glare annoyedly at error message Actual Results: test.cs(9,25): error CS1640: foreach statement cannot operate on variables of type `Testing.Common.GlobalMonitoredCharacterCollection' because it contains multiple implementation of `System.Collections.Generic.IEnumerable<T>'. Try casting to a specific implementation /home/cubic/temp/mono-bug/lib.dll (Location of the symbol related to previous error) Compilation failed: 1 error(s), 0 warnings Expected Results: The succesful compilation of the testcase. I am using Arch Linux. $ mcs --version Mono C# compiler version 2.8.1.0 $ uname -a Linux fancy 2.6.36-ARCH #1 SMP PREEMPT Wed Nov 24 06:44:11 UTC 2010 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD GNU/Linux -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
