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=82091 --- shadow/82091 2007-07-13 10:31:57.000000000 -0400 +++ shadow/82091.tmp.15132 2007-07-13 10:31:58.000000000 -0400 @@ -0,0 +1,48 @@ +Bug#: 82091 +Product: Mono: Compilers +Version: 1.2 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Bogus CS0168 (variable declared but never used) + +The following program causes a CS0168 warning when compiled with mcs/gmcs. + It generates no errors or warning when compiled with MS. + +using System; + +public class MyClass2 +{ + static public void Main () + { + bool b = true; + object o; + + switch (b) { + case true: + try { + o = "yo"; + return; + } catch (Exception) { + return; + } + } + } +} + +Actual Result: +> gmcs test.cs +test.cs(8,24): warning CS0168: The variable `o' is declared but never used + +Expected Result: +No warning or error. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
