[Mono-bugs] [Bug 72644][Nor] New - Assertion fails on generic methods containing generic anonymous delegates
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 16 Feb 2005 11:46:07 -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 ximian@asaj.org.
http://bugzilla.ximian.com/show_bug.cgi?id=72644
--- shadow/72644 2005-02-16 11:46:07.000000000 -0500
+++ shadow/72644.tmp.11810 2005-02-16 11:46:07.000000000 -0500
@@ -0,0 +1,74 @@
+Bug#: 72644
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details: Gentoo 2.6.9-r4
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ximian@asaj.org
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Assertion fails on generic methods containing generic anonymous delegates
+
+Description of Problem:
+
+Generic methods which contain generic anonymous delegates causes a
+low-level assertion failure.
+
+Steps to reproduce the problem:
+1. Compile the attached code with gmcs 1.1.2.0.
+2. Run with mono 1.1.3.
+
+Actual Results:
+
+** ERROR **: file metadata.c: line 1756
+(mono_metadata_parse_generic_param): assertion failed: (generic_context)
+aborting...
+Killed
+
+Expected Results:
+
+Successful run.
+
+How often does this happen?
+
+Always.
+
+Additional Information:
+
+Code which demonstrates the problem:
+
+public delegate int T<X>(X x);
+
+public class B {
+
+ public static T<X> M<X>() {
+ return delegate(X x) { return 5; };
+ }
+
+}
+
+public class C<X> {
+
+ public static T<X> M() {
+ return delegate(X x) { return 5; };
+ }
+
+}
+
+public class D {
+
+ public static void Main(string[] args) {
+ // This call is fine:
+ C<int>.M();
+ // This call is not:
+ B.M<int>();
+ }
+
+}