}
} else if (parameters.IsEmpty && name == Destructor.MetadataName) {
kind = MemberKind.Destructor;
+ if (declaringType == TypeManager.object_type) {
+ mod &= ~Modifiers.OVERRIDE;
+ mod |= Modifiers.VIRTUAL;
+ }
}
}
if ((ma & MethodAttributes.Static) != 0) {
mod |= Modifiers.STATIC;
- } else if ((ma & MethodAttributes.Final) != 0) {
- mod |= Modifiers.SEALED;
- } else if ((ma & MethodAttributes.Abstract) != 0 && declaringType.IsClass) {
+ return mod;
+ }
+ if ((ma & MethodAttributes.Abstract) != 0 && declaringType.IsClass) {
mod |= Modifiers.ABSTRACT;
+ return mod;
}
+ if ((ma & MethodAttributes.Final) != 0)
+ mod |= Modifiers.SEALED;
+
// It can be sealed and override
if ((ma & MethodAttributes.Virtual) != 0) {
if ((ma & MethodAttributes.NewSlot) != 0 || !declaringType.IsClass || mod == Modifiers.PRIVATE) {