http://bugzilla.novell.com/show_bug.cgi?id=568989
http://bugzilla.novell.com/show_bug.cgi?id=568989#c0 Summary: linq expression code causes mono_method_to_ir assertion Classification: Mono Product: Mono: Runtime Version: 2.6.x Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: JIT AssignedTo: lu...@novell.com ReportedBy: c...@carlo-kok.com QAContact: mono-bugs@lists.ximian.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 Code in "additional information" throws a runtime assertion (while on .net it runs fine). Reproducible: Always Steps to Reproduce: 1. compile the code in the additional info field 2. run it Actual Results: ** ERROR:method-to-ir.c:5426:mono_method_to_ir: assertion failed: (sig->generic_par am_count) This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Expected Results: 1 Test One using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Linq.Expressions; namespace ConsoleApplication98 { class MyTest { public int? ID { get; set; } public string Name { get; set; } } class Program { static void Main(string[] args) { List<MyTest> t = new List<MyTest>(); t.Add(new MyTest { ID = 1, Name = "Test One" }); t.Add(new MyTest { ID = 2, Name = "Test Two" }); ParameterExpression exp = Expression.Parameter(typeof(MyTest), "T"); Expression body = Expression.Equal( Expression.Call( Expression.Property(exp, "ID"), "GetValueOrDefault", new Type[0], Expression.Constant(-1)), Expression.Constant(1)); var where = (Func<MyTest, Boolean>)Expression.Lambda(typeof(Func<MyTest, Boolean>), body, exp).Compile(); foreach (var r in Enumerable.Where(t,where)) { Console.WriteLine(r.ID+" "+r.Name); } } } } -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs