2006-08-17 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / mbas / decl.cs
index d924d6a3f3dcd49d1c2fa6b2299c9618ccc7f9e6..4f17b3520e3d48ef8924f8b8a5c6a296e8fd08f8 100644 (file)
@@ -61,7 +61,7 @@ namespace Mono.MonoBASIC {
                        // FIXME: report the old/new permissions?
                        //
                        Report.Error (
-                               507, Location, parent.MakeName (Name) +
+                               31048, Location, parent.MakeName (Name) +
                                ": can't change the access modifiers when overriding inherited " +
                                "member `" + name + "'");
                }
@@ -198,15 +198,6 @@ namespace Mono.MonoBASIC {
                        /// </summary>
                        NameExists,
 
-                       /// <summary>
-                       ///   Returned if the declation being added to the
-                       ///   name space clashes with its container name.
-                       ///
-                       ///   The only exceptions for this are constructors
-                       ///   and static constructors
-                       /// </summary>
-                       EnclosingClash,
-
                        /// <summary>
                        ///   Returned if a constructor was created (because syntactically
                        ///   it looked like a constructor) but was not (because the name
@@ -273,9 +264,6 @@ namespace Mono.MonoBASIC {
                /// </summary>
                protected AdditionResult IsValid (string name)
                {
-                       if (name == Basename)
-                               return AdditionResult.EnclosingClash;
-
                        if (defined_names.Contains (name))
                                return AdditionResult.NameExists;
 
@@ -996,9 +984,9 @@ namespace Mono.MonoBASIC {
                void AddMembers (MemberTypes mt, BindingFlags bf, IMemberContainer container)
                {
                        MemberList members = container.GetMembers (mt, bf);
-                       BindingFlags new_bf = (container == Container) ?
+                       /*BindingFlags new_bf = (container == Container) ?
                                bf | BindingFlags.DeclaredOnly : bf;
-
+                       */
                        foreach (MemberInfo member in members) {
                                string name = member.Name;
 
@@ -1242,7 +1230,8 @@ bf |= BindingFlags.IgnoreCase;
                                // iteration of this loop if there are no members with the name we're
                                // looking for in the current class).
                                if (entry.Container != current) {
-                                       if (declared_only || DoneSearching (list))
+                                       //if (declared_only || DoneSearching (list))
+                                       if (declared_only)
                                                break;
 
                                        current = entry.Container;