[Mono-bugs] [Bug 434582] New: Fields not renamed correctly in generic types

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Oct 12 05:13:23 EDT 2008


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


           Summary: Fields not renamed correctly in generic types
           Product: Mono: Class Libraries
           Version: 2.0
          Platform: i686
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Cecil
        AssignedTo: jbevain at novell.com
        ReportedBy: zanochat at hotmail.fr
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User


Created an attachment (id=245005)
 --> (https://bugzilla.novell.com/attachment.cgi?id=245005)
VS project to reproduce the bug

Description of Problem:

When changing the name of fields in a generic type,
the new assembly methods still reference the former fields names (while the
fields themselves are renamed correctly).


Steps to reproduce the problem:
1. Open the attached solution in Visual Studio
2. Run the project

The projet just renames the 2 fields of the following class:
public class Class1<T> where T: class
{
    // Fields
    private int field1;
    private string field2;

    // Methods
    public void Method1()
    {
        this.field1 = 13;
        this.field2 = "qsfghj";
    }
}





Actual Results:
The generated Cecil2.dll contains an invalid class "Class1" where the fields
name are not renamed in the method body.

public class Class1<T> where T: class
{
    // Fields
    private int a;
    private string b;

    // Methods
    public void Method1()
    {
        this.field1 = 13;
        this.field2 = "qsfghj";
    }
}

Expected Results:
public class Class1<T> where T: class
{
    // Fields
    private int a;
    private string b;

    // Methods
    public void Method1()
    {
        this.a= 13;
        this.b= "qsfghj";
    }
}


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