[Mono-bugs] [Bug 26973][Nor] New - In try block, 'return' doesn't return

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
25 Jun 2002 19:57:07 -0000


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 adb@tardis.ed.ac.uk.

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

--- shadow/26973	Tue Jun 25 15:57:06 2002
+++ shadow/26973.tmp.29268	Tue Jun 25 15:57:06 2002
@@ -0,0 +1,37 @@
+Bug#: 26973
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: adb@tardis.ed.ac.uk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: In try block, 'return' doesn't return
+
+Steps to reproduce the problem:
+
+class X {
+	public static void Main() {
+		try {
+			return;
+		} catch (Exception) {}	
+		System.Console.WriteLine("Shouldn't get here");
+	}
+}
+
+Actual Results:
+
+Prints "Shouldn't get here"
+
+Expected Results:
+
+It shouldn't print anything.  The 'return' should cause the function to
+exit, only executing finally blocks (if any).