[Mono-bugs] [Bug 377509] New: Argument name not emitted when attribute is applied to argument of setter

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Apr 5 16:54:01 EDT 2008


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


           Summary: Argument name not emitted when attribute is applied to
                    argument of setter
           Product: Mono: Runtime
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: gert.driesen at pandora.be
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Compiling the following code using (g)mcs results in a set_Font method with an
argument that has no name:

using System;
using System.Drawing;
using System.Reflection;
using System.Runtime.InteropServices;

class Program
{
        static void Main ()
        {
                Type t = typeof (Control);
                MethodInfo m = t.GetMethod ("set_Font");
                Console.WriteLine (m.GetParameters () [0].Name);
        }
}

class Control
{
        public virtual Font Font
        {
                get
                {
                        return null;
                }
                [param: MarshalAs (UnmanagedType.CustomMarshaler,
MarshalTypeRef = typeof (Font))]
                set
                {
                }
        }
}

Expected result:

value

Actual result:

no output


-- 
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