Reorder MethodBase::Attributes usage
authorMarek Safar <marek.safar@gmail.com>
Wed, 27 Oct 2010 12:37:06 +0000 (13:37 +0100)
committerMarek Safar <marek.safar@gmail.com>
Wed, 27 Oct 2010 12:37:44 +0000 (13:37 +0100)
mcs/mcs/import.cs

index 4ad1164464672b2028caa2aecaa4c59f9ad0bfb7..d743a76f99d21a177408d72c1845e5d50f090db4 100644 (file)
@@ -1356,14 +1356,17 @@ namespace Mono.CSharp
                                        case MemberTypes.Constructor:
                                        case MemberTypes.Method:
                                                MethodBase mb = (MethodBase) member;
+                                               var attrs = mb.Attributes;
 
-                                               // Ignore explicitly implemented members
-                                               if ((mb.Attributes & explicit_impl) == explicit_impl && (mb.Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.Private)
-                                                       continue;
+                                               if ((attrs & MethodAttributes.MemberAccessMask) == MethodAttributes.Private) {
+                                                       // Ignore explicitly implemented members
+                                                       if ((attrs & explicit_impl) == explicit_impl)
+                                                               continue;
 
-                                               // Ignore compiler generated methods
-                                               if (mb.IsPrivate && mb.IsDefined (typeof (CompilerGeneratedAttribute), false))
-                                                       continue;
+                                                       // Ignore compiler generated methods
+                                                       if (mb.IsDefined (typeof (CompilerGeneratedAttribute), false))
+                                                               continue;
+                                               }
 
                                                imported = meta_import.CreateMethod (mb, declaringType);
                                                if (imported.Kind == MemberKind.Method && !imported.IsGeneric) {