[Mono-bugs] [Bug 475962] New: exception thrown from CreateDelegate () when compiling Expression returning a delegate

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Feb 14 10:58:26 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=475962


           Summary: exception thrown from CreateDelegate () when compiling
                    Expression returning a delegate
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Core
        AssignedTo: jbevain at novell.com
        ReportedBy: vargaz at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.6)
Gecko/2009020407 Iceweasel/3.0.6 (Debian-3.0.6-1)

From:

https://bugzilla.novell.com/show_bug.cgi?id=463323

Testcase:

using System;
using System.Linq.Expressions;

namespace MonoBug
{
   class Program
   {
      public void testFunc() {}
      static void Main()
      {
      // the commented line doesn't have any problems...
      // Expression<System.Func<Program, Action>> action = (d =>
      //   (Action)Delegate.CreateDelegate(typeof(Action), d,"testFunc" ));

         Expression<System.Func<Program, Action>> action = (d => d.testFunc);
         var t = action.Compile();
         Program p = new Program();
         t(p);
      }
   }
} 


Reproducible: Always

Steps to Reproduce:
1.
2.
3.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list