http://bugzilla.novell.com/show_bug.cgi?id=566511
http://bugzilla.novell.com/show_bug.cgi?id=566511#c0 Summary: Lambda/Expression throws ArgumentException: The field handle and the type handle are incompatible in generic class. Classification: Mono Product: Mono: Runtime Version: 2.6.x Platform: 32bit OS/Version: openSUSE 11.2 Status: NEW Severity: Critical Priority: P5 - None Component: generics AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Third Party Developer/Partner Blocker: Yes Created an attachment (id=333767) --> (http://bugzilla.novell.com/attachment.cgi?id=333767) Compressed MonoDevelop project to reproduce bug. Description of Problem: Lambda/Expression throws ArgumentException: The field handle and the type handle are incompatible in generic class. using System; using System.Linq.Expressions; using NUnit.Framework; namespace FieldInfoBug { [TestFixture] public class MonoRuntime { [Test] public void Throws_ArgumentException_If_Class_Is_A_Generic() { // This constructor throws ArgumentException: // The field handle and the type handle are incompatible. new GenericClass<object>("value"); } [Test] public void Creates_An_Instance_If_Class_Is_NOT_A_Generic() { // This is OK. new TestClass("value"); } } public class GenericClass<T> { public GenericClass(string argument) { Expression<Func<string>> expression = () => argument; } } public class TestClass { public TestClass(string argument) { Expression<Func<object>> expression = () => argument; } } } Steps to reproduce the problem: 1. Extract C# project attached to this report. 2. Open project in MonoDevelop 2.2 3. Execute unit tests available in it. Actual Results: Lambda/Expression throws ArgumentException: The field handle and the type handle are incompatible in generic class. Expected Results: No exception. How often does this happen? Everytime. Additional Information: The bug was found on openSUSE 11.2 VMWare machine available in Mono downloads. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
