http://bugzilla.novell.com/show_bug.cgi?id=575589
http://bugzilla.novell.com/show_bug.cgi?id=575589#c0 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: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.78 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 so: [TestFixture(typeof(List<int>))] 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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=2.0.0.0, 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. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
