[Mono-bugs] [Bug 59071][Wis] New - mcs doesn't report CS0160 error

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 25 May 2004 17:37:03 -0400 (EDT)


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 totte@hiddenpeaks.com.

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

--- shadow/59071	2004-05-25 17:37:03.000000000 -0400
+++ shadow/59071.tmp.1794	2004-05-25 17:37:03.000000000 -0400
@@ -0,0 +1,44 @@
+Bug#: 59071
+Product: Mono: Compilers
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: totte@hiddenpeaks.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs doesn't report CS0160 error
+
+Test case:
+
+using System;
+
+// Should give an:
+// 
+// Error CS0160: A previous catch clause already catches all exceptions of 
+this or a super type ('System.ArithmeticException')
+//
+namespace Catch {
+	class Bug {
+		static void Main(string[] args) {
+			bool nop = false;
+
+			try {
+				nop = true;
+			} 
+			catch (ArithmeticException) {
+				nop = false;
+			} 
+			catch (DivideByZeroException) {
+				nop = true;
+			}
+		}
+	}
+}