Bug 317199 (MONO72644) - [GMCS]: Anonymous generic methods in delegates
Summary: [GMCS]: Anonymous generic methods in delegates
Status: RESOLVED FIXED
Alias: MONO72644
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-16 18:46 UTC by Alan Jeffrey
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:07:27 UTC


---- Reported by ximian@asaj.org 2005-02-16 11:46:07 MST ----

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>();
  }

}



---- Additional Comments From martin@ximian.com 2005-04-29 11:55:24 MST ----

Fixed in SVN.


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>Gentoo 2.6.9-r4</cf_op_sys_details>
Unknown operating system unknown. Setting to default OS "Other".