[Mono-bugs] [Bug 52589][Wis] Changed - We allow break, continue, goto to exit a finally block

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 7 Jan 2004 01:16:43 -0500 (EST)


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 miguel@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=52589

--- shadow/52589	2004-01-04 16:17:10.000000000 -0500
+++ shadow/52589.tmp.32322	2004-01-07 01:16:43.000000000 -0500
@@ -1,14 +1,14 @@
 Bug#: 52589
 Product: Mono/Compilers
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: C#
 AssignedTo: martin@ximian.com                            
 ReportedBy: bmaurer@users.sf.net               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -32,6 +32,31 @@
 }
 
 to compile. They should report a CS0157. I have put three test cases (one
 for each statement type) in mcs/errors.
 
 Baulig, this is your area.
+
+------- Additional Comments From miguel@ximian.com  2004-01-07 01:16 -------
+Implementation idea for this.
+
+For the break and continue cases we could replace the:
+
+bool old_in_finally = ec.InFinally;
+ec.InFinally = true;
+...
+ec.InFinaly = old_in_finally
+
+pattern, with:
+
+ec.PushFinally ();
+ec.PopFinally ();
+
+PushFinally would save the current state for InFinally and 
+InLoop.  PopFinally would restore the two values.
+
+Then Break and Continue can check on: InFinally inside their
+InLoop tests and flag the more meaningful `can not leave the body
+of a finally clause'.
+
+The Goto statement is a different story.
+