https://bugzilla.novell.com/show_bug.cgi?id=332909
Summary: MCS quietly ignores attributes with inaccessible
constructor
Product: Mono: Compilers
Version: 1.2
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
QAContact: [EMAIL PROTECTED]
Found By: ---
The following code compiles without error on Mono:
using System;
using System.Reflection;
namespace Test {
public class SomeAttribute : Attribute {
SomeAttribute() {}
}
[SomeAttribute]
public class SomeClass {
public int SomeProp { get { return 0; } }
static void Main() {
Console.WriteLine(typeof(SomeClass).GetCustomAttributes(typeof(SomeAttribute),
true).Length);
}
}
}
The output is "0" as the SomeAttribute is not compiled into the .exe/.dll.
On MS.NET, csc stops with error CS0122.
--
Configure bugmail: https://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