[Mono-bugs] [Bug 22636] New - Codepath calculation involving try { } catch { }

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
27 Mar 2002 20:06:47 -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 dihlewis@yahoo.co.uk.

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

--- shadow/22636	Wed Mar 27 15:06:47 2002
+++ shadow/22636.tmp.16299	Wed Mar 27 15:06:47 2002
@@ -0,0 +1,36 @@
+Bug#: 22636
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dihlewis@yahoo.co.uk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Codepath calculation involving try { } catch { }
+
+MCS will not compile the following code, complaining that not all code 
+paths in the method Test() return a value.
+
+
+using System;
+
+public class X {
+	public static void Main () { }
+
+	public static bool Test () {
+		try {
+			return true;
+		}
+		catch (Exception) {
+			return false;
+		}
+	}
+}