svn path=/trunk/mcs/; revision=26517
* ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
classes.
+2004-04-28 Martin Baulig <martin@ximian.com>
+
+ Committing a patch from Ben Maurer; see bug #50820.
+
+ * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
+ check for classes.
+
+ * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
+ classes.
+
2004-04-28 Martin Baulig <martin@ximian.com>
* statement.cs (Block.LookupLabel): Also lookup in implicit child blocks.
}
if ((qualifier_type != null) && (qualifier_type != ec.ContainerType) &&
- !qualifier_type.IsSubclassOf (ec.ContainerType)) {
+ ec.ContainerType.IsSubclassOf (qualifier_type)) {
// Although a derived class can access protected members of
// its base class it cannot do so through an instance of the
// base class (CS1540). If the qualifier_type is a parent of the
// it cannot do so through an instance of the base class (CS1540).
if (!mb.IsStatic && (closure_invocation_type != closure_qualifier_type) &&
(closure_qualifier_type != null) &&
- ! closure_qualifier_type.IsSubclassOf (closure_invocation_type) &&
+ closure_invocation_type.IsSubclassOf (closure_qualifier_type) &&
!TypeManager.IsNestedChildOf (closure_invocation_type, closure_qualifier_type))
return false;