https://bugzilla.novell.com/show_bug.cgi?id=640718
https://bugzilla.novell.com/show_bug.cgi?id=640718#c0 Summary: Mono 2.8 Preview 6: gmcs regression -- spurious CS0165 error 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 Code that previously compiled with 2.6.7 and compiles with microsoft's csc is failing to build with 2.8 preview 6. 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]) br...@brianmbp ~ $ cat y.cs public class Foo { static void Bar(System.Threading.ThreadStart ts) { } static void Baz(int yy) { } public static void Main(string[] args) { Bar(delegate { foreach (string x in new string[0]) { int yy; switch (x) { case "x": yy = 1; break; default: continue; } Baz(yy); } }); } } br...@brianmbp ~ $ gmcs --version Mono C# compiler version 2.8.0.0 br...@brianmbp ~ $ gmcs y.cs y.cs(13,21): error CS0165: Use of unassigned local variable `yy' Compilation failed: 1 error(s), 0 warnings Reproducible: Always Steps to Reproduce: See above. Actual Results: Compilation fails with CS0165 Expected Results: Compilation succeeds. The code is valid and yy is used improperly. It looks like something in the compiler's flow analysis stuff breaks within anonymous method blocks. -- 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
