[Mono-bugs] [Bug 575589] New: Custom attributes messed up with generic arguments

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jan 30 20:52:53 EST 2010



           Summary: Custom attributes messed up with generic arguments
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: x86
        OS/Version: Windows Vista
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Cecil
        AssignedTo: jbevain at novell.com
        ReportedBy: simone.busoli at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US)
AppleWebKit/532.5 (KHTML, like Gecko) Chrome/ Safari/532.5

I have found the following code to break when loading and then saving an
assembly with Cecil.

Reproducible: Always

Steps to Reproduce:
1. Given the following code:

public class TestFixtureAttribte : Attribute
    public TestFixtureAttribute(params object[] args) { ... }

2. Decorate a class with the above attribute by providing a generic type, like

public class SomeFixture

3. Load and the save the assembly containing the code above with Cecil.
Actual Results:  
The generated IL for the attribute is wrong:

custom instance void
[nunit.framework]NUnit.Framework.TestFixtureAttribute::.ctor(object[]) = { new
object[int32(1)] { string('System.Collections.Generic.List`1[[System.Int32,
mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089]],
mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089') }

Expected Results:  
This is the correct IL:

custom instance void
[nunit.framework]NUnit.Framework.TestFixtureAttribute::.ctor(object[]) = { new
object[int32(1)] { type([mscorlib]System.Collections.Generic.List`1<int32>) } }

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