[Mono-bugs] [Bug 82431][Nor] Changed - Attribute.IsDefined returns true when it shouldn't

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 16 08:25:11 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gert.driesen at pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=82431

--- shadow/82431	2007-08-15 04:51:24.000000000 -0400
+++ shadow/82431.tmp.19121	2007-08-16 08:25:11.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 82431
 Product: Mono: Class Libraries
 Version: 1.2
 OS: unknown
 OS Details: 
-Status: RESOLVED   
-Resolution: FIXED
+Status: REOPENED   
+Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: CORLIB
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: daniel at hofmannmail.ath.cx               
 QAContact: mono-bugs at ximian.com
@@ -60,6 +60,31 @@
 Additional Information:
 I got the true-result running the above code on my debian-mono 1.2.4
 and the false-result running it on .Net.
 
 ------- Additional Comments From gert.driesen at pandora.be  2007-08-15 04:51 -------
 Fixed in SVN (revision 84139).
+
+------- Additional Comments From gert.driesen at pandora.be  2007-08-16 08:25 -------
+The fix I committed is only valid for the 1.0 profile.
+
+Problem is that our implementation of IsDefined (even before my fix) 
+is broken on the 2.0 profile (the 1.0 profile could be considered 
+broken as well but it matches the broken MS implementation):
+
+It should only return true if:
+
+* The specified attribute is found on the ICustomAttributeProvider 
+itself.
+* An attribute deriving from the specified attribute is found on the 
+ICustomAttributeProvider itself.
+
+or, when inherited is true:
+
+* the specified attribute or an attribute deriving from the specified 
+attribute is found in the inheritance chain of the 
+ICustomAttributeProvider, and AttributeUsage.Inherited of the found 
+attribute is true (if not continue on)
+
+Currently, however, the unmanaged implementation (IsDefinedInternal) 
+does not take into account AttributeUsage.Inherited nor the level in 
+the inheritance chain.


More information about the mono-bugs mailing list