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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=79979 --- shadow/79979 2006-11-19 04:28:06.000000000 -0500 +++ shadow/79979.tmp.9804 2006-11-19 04:28:06.000000000 -0500 @@ -0,0 +1,43 @@ +Bug#: 79979 +Product: Mono: Class Libraries +Version: 1.2 +OS: All +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: CORLIB +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: [PATCH] IsDefined() is mis implemented. + +IsDefined() is mis implemented. + +In MonoCustomAttrs.cs: + + MethodInfo baseMethod = method.GetBaseDefinition (); + +GetBaseDefinition() not return its direct super method, but the virtual +method where its first declared. And there is no standrad way do this. I +hacked it: + ++ return t.GetMethod(method.Name, BindingFlags.FlattenHierarchy | +BindingFlags.Instance | BindingFlags.InvokeMethod | BindingFlags.NonPublic +| BindingFlags.Public, null, GetMethodParameterTypes(method), null); + + BindingFlags.FlattenHierarchy will search Method up and find the first +virtual method. + +There is another problem, Attribute itself can determinate whether inheriting. + + ++ if (inherit && GetUsage(attributeType).Inherited && ((btype = GetBase +(obj)) != null)) + + +Maybe GetCustomAttributes also contains such problems. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
