[Mono-bugs] [Bug 366983] New: Properties on Attributes missing

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Mar 4 11:47:29 EST 2008


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


           Summary: Properties on Attributes missing
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Cecil
        AssignedTo: jbevain at novell.com
        ReportedBy: jpobst at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


I think this is what is causing the cecil corcompare to not match the SRE
corcompare.

Given this program:

using System;

namespace MyNamespace
{
        [CLSCompliant (false)]
        public class Test
        {
                static void Main ()
                {
                        Console.WriteLine ("Hello World");
                }
        }
}

compiled as gmcs test.cs

And then viewed with this cecil program:

using System;
using Mono.Cecil;

public class Test
{
        static void Main ()
        {
                AssemblyDefinition ad = AssemblyFactory.GetAssembly
("test.exe");

                foreach (ModuleDefinition md in ad.Modules) {
                        Console.WriteLine ("Module: {0}", md.Name);

                        foreach (TypeDefinition td in md.Types) {
                                Console.WriteLine ("Type: {0}", td.Name);

                                foreach (CustomAttribute ca in
td.CustomAttributes) {
                                        ca.Resolve ();
                                        Console.WriteLine ("Attribute: {0},
Resolved: {1}", ca.Constructor.DeclaringType.FullName, ca.Resolved);

                                        foreach (PropertyDefinition pd in
ca.Properties)
                                                Console.WriteLine ("Property:
{0}, Value: {1}", pd.Name, pd.Constant);
                                }
                        }

                }
        }
}

The output is:
Module: test.exe
Type: <Module>
Type: Test
Attribute: System.CLSCompliantAttribute, Resolved: True

when i would expect it to be:
Module: test.exe
Type: <Module>
Type: Test
Attribute: System.CLSCompliantAttribute, Resolved: True
Property: IsCompliant Value: False

Tested Cecil version is 0.6.8.8607.


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