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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=75317 --- shadow/75317 2005-06-19 09:17:13.000000000 -0400 +++ shadow/75317.tmp.6386 2005-06-19 09:17:13.000000000 -0400 @@ -0,0 +1,51 @@ +Bug#: 75317 +Product: Mono: Compilers +Version: 1.1 +OS: All +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: CS0162 (unreachable code) incorrectly reported for code using goto statement + +mcs incorrectly reports CS0162 (Unreachable code detected) for the +following code snippet: + +using System; + +public class FlowControlTest +{ + public static void Main () + { + DateTime currentDate = DateTime.Now; + + if (currentDate.Year > 2000) { + goto check_year; + } + + return; + +check_year: + Console.WriteLine ("check year"); + return; + } +} + +Actual result: + +test.cs(6) warning CS0162: Unreachable code detected +Compilation succeeded - 1 warning(s) + +Expected result: + +Succesful compilation without warnings + +This is the result you get when you use csc. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
