[Mono-bugs] [Bug 75062][Wis] New - gmcs does not compile generic exception classes

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri May 27 02:26:37 EDT 2005


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 dsilva at ccs.neu.edu.

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

--- shadow/75062	2005-05-27 02:26:37.000000000 -0400
+++ shadow/75062.tmp.19134	2005-05-27 02:26:37.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 75062
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: dsilva at ccs.neu.edu               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: gmcs does not compile generic exception classes
+
+Description of Problem:
+
+gmcs does not compile this program.
+
+
+using System.Collections.Generic;
+
+public class App {
+  public static void Main() {
+    throw new DictionaryNotFoundExn<string, int>(null, "the key");
+  }
+}
+
+public class DictionaryNotFoundExn<Key, Value> : System.Exception {
+  public readonly Dictionary<Key, Value> d;
+  public readonly Key key;
+  public DictionaryNotFoundExn(Dictionary<Key, Value> d, Key key) {
+    this.d = d;
+    this.key = key;
+  }
+}
+
+
+Actual Results:
+
+$ gmcs d.cs
+d.cs(5) error CS0155: The type caught or thrown must be derived from
+System.Exception


More information about the mono-bugs mailing list