https://bugzilla.novell.com/show_bug.cgi?id=640722
https://bugzilla.novell.com/show_bug.cgi?id=640722#c0 Summary: Mono 2.8 Preview 6: gmcs regression -- spurious CS0108 warning Classification: Mono Product: Mono: Compilers Version: 2.8.x Platform: Macintosh OS/Version: Mac OS X 10.6 Status: NEW Severity: Normal Priority: P5 - None Component: C# AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.25 Safari/534.3 This warning is not produced by 2.6.7 nor microsoft's csc. I am testing with the binary x86 osx distribution of the compiler available here: http://mono.ximian.com/monobuild/preview/download-preview/. The top of the page indicated the following version at the time of the download: Mono 2.8 Downloads (Preview 6 [58f029f]) The warning appears to be incorrect (explained below). br...@brianmbp ~ $ cat z.cs public abstract class Base { public delegate void Action<U>(U val); } public class Derived<U> : Base { internal Action<U> Action; } public class Foo { public static void Main(string[] args) { } } br...@brianmbp ~ $ gmcs --version Mono C# compiler version 2.8.0.0 br...@brianmbp ~ $ gmcs z.cs z.cs(8,24): warning CS0108: `Derived<U>.Action' hides inherited member `Base.Action<U>'. Use the new keyword if hiding was intended z.cs(3,26): (Location of the symbol related to previous warning) Compilation succeeded - 1 warning(s) Reproducible: Always Steps to Reproduce: 1. See above Actual Results: Warning is emitted Expected Results: Compilation succeeds with no warnings. At first glance this warning appears to be warranted, but upon further inspection, I'm almost positive that it's a bug. The "Action" field on Derived cannot shadow the nested "Action<U>" type on Derived because the nested type requires a type parameter. Every reference to Action/Action<> will is unambiguous depending on the presence or absence of a type parameter, thus no shadowing is occurring here. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
