Re-enable 'crlf' attributes on *.cs
[mono.git] / mcs / mcs / import.cs
index 88b460a57093b084a3ce9254d0ccf90989db3bc7..234429676cc2497334d7fc40cac5074e3cd853c8 100644 (file)
@@ -252,6 +252,10 @@ namespace Mono.CSharp
                                                }
                                        } else if (parameters.IsEmpty && name == Destructor.MetadataName) {
                                                kind = MemberKind.Destructor;
+                                               if (declaringType == TypeManager.object_type) {
+                                                       mod &= ~Modifiers.OVERRIDE;
+                                                       mod |= Modifiers.VIRTUAL;
+                                               }
                                        }
                                }
 
@@ -679,12 +683,16 @@ namespace Mono.CSharp
 
                        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) {