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


           Summary: use of ldflda breaks remoting support
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          Found By: ---


Consider the following program:
using System;

public class Test: MarshalByRefObject
{
        public DateTime Stamp = new DateTime (1968, 1, 2);

        static void Main ()
        {
                AppDomain d = AppDomain.CreateDomain ("foo");
                Test t = (Test) d.CreateInstanceAndUnwrap (typeof
(Test).Assembly.FullName, typeof (Test).FullName);
                t.Stamp = new DateTime (1968, 1, 3);
                Console.WriteLine (t.Stamp);
        }
}

mcs emits a ldflda to call the DateTime constructor for t.Stamp.
It should use a local variable instead and use a ldfld instruction to store the
field.
The sample compiled with mcs will throw a InvalidOperationException at runtime.


-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to