[Mono-bugs] [Bug 425345] New: Should anonymous delegate be serializable? ( when used for AppDomain.DoCallBack())

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Sep 10 23:07:50 EDT 2008


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


           Summary: Should anonymous delegate be serializable? (when used
                    for AppDomain.DoCallBack())
           Product: Mono: Compilers
           Version: SVN
          Platform: 64bit
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: mono at e-tobi.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


This code, compiled with the current gmcs from the SVN trunk,:

public class MainClass
{
    public static void Main()
    {
        AppDomain domain = AppDomain.CreateDomain("Foo", null, null);
        domain.DoCallBack(delegate {});
    }
}

..fails with the Mono as well as with the MS .NET runtime with:

"System.Runtime.Serialization.SerializationException: Type
MainClass+<>c__CompilerGenerated0 is not marked as Serializable."

When I modify CompilerGeneratedClass to add TypeAttributes.Serializable, then
the gmcs result at least runs fine within the MS .NET environment, but fails on
Mono with:

System.Runtime.Serialization.SerializationException: Serialization will not
deserialize delegates to non-public methods.

Compiling the code on VS2008 and running it on Mono leads to the same error, so
I think, this is not only a compiler bug, but also a runtime problem.


-- 
Configure bugmail: https://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.


More information about the mono-bugs mailing list