Bugzilla – Bug 318544
[GMCS] line 1810 (mono_metadata_parse_generic_param): assertion failed: (generic_context)
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by malekith@pld-linux.org 2005-07-19 09:46:58 MST ---- Description of Problem: I was trying to reproduce a problem I have with Nemerle compiled code. While rewriting it in C# another issue occured, which seems to be related. Steps to reproduce the problem: 1. Compile the following program with gmcs class C<X,Y> { class Q<A,B> { public void apply (C<X,Y> t) { t.bar<A,B>(); } } public void foo<A,B> () { Q<A,B> q = new Q<A,B>(); q.apply(this); } public void bar<A,B> () { System.Console.WriteLine ("'{0} {1} {2} {3}'", typeof(X),typeof(Y),typeof(A),typeof(B)); } } class X { public static void Main () { C<int,string> c = new C<int,string>(); c.foo<float,string> (); } } 2. run it Actual Results: ** ERROR **: file metadata.c: line 1810 (mono_metadata_parse_generic_param): assertion failed: (generic_context) aborting... zsh: 28350 abort ~/mono-svn/bin/mono foo.exe Expected Results: 'System.Int32 System.String System.Single System.String' How often does this happen? always Additional Information: I'm using mono svn. The program works as expected on ms.net, also csc-compiled executable fails, so this seems like a runtime issue. ---- Additional Comments From kiess@h3c.de 2005-09-13 12:17:51 MST ---- A shorter testcase which fails with the same error: class A<T1> { public void f<T2> () {} } class M { public static void Fun<T>() { //new A<T>(); // with this it will work ((A<T>)null).f<object>(); } public static void Main() { Fun<object>(); } } ---- Additional Comments From akopa@charter.net 2005-09-13 13:34:29 MST ---- Created an attachment (id=168255) error log of monodis attempt ---- Additional Comments From akopa@charter.net 2005-09-13 13:35:41 MST ---- also fails with same error disassembling the generated .exe ---- Additional Comments From martin@ximian.com 2005-09-27 12:17:16 MST ---- Fixed in SVN; added as gtest-203.cs. Imported an attachment (id=168255) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>amd64 pld linux</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".