+2006-12-19 Marek Safar <marek.safar@gmail.com>
+
+ * class.cs (GetClassBases): Write 5 times every day, will never use
+ FullName for error reporting.
+
+ * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
+
2006-12-19 Martin Baulig <martin@ximian.com>
* statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
if (!iface.IsInterface) {
if (Kind != Kind.Class) {
// TODO: location of symbol related ....
- Error_TypeInListIsNotInterface (Location, iface.FullName);
+ Error_TypeInListIsNotInterface (Location, iface.GetSignatureForError ());
}
else if (base_class != null)
Report.Error (1721, Location, "`{0}': Classes cannot have multiple base classes (`{1}' and `{2}')",
// May also be null when resolving top-level attributes.
return true;
- if (TypeManager.IsGenericParameter (check_type))
- return true; // FIXME
-
- TypeAttributes check_attr = check_type.Attributes & TypeAttributes.VisibilityMask;
-
//
// Broken Microsoft runtime, return public for arrays, no matter what
// the accessibility is for their underlying class, and they return
if (check_type.IsArray || check_type.IsPointer)
return CheckAccessLevel (TypeManager.GetElementType (check_type));
+ if (TypeManager.IsGenericParameter(check_type))
+ return true; // FIXME
+
+ TypeAttributes check_attr = check_type.Attributes & TypeAttributes.VisibilityMask;
+
switch (check_attr){
case TypeAttributes.Public:
return true;
//
public bool AsAccessible (Type p, int flags)
{
- if (TypeManager.IsGenericParameter (p))
- return true; // FIXME
-
//
// 1) if M is private, its accessability is the same as this declspace.
// we already know that P is accessible to T before this method, so we
while (p.IsArray || p.IsPointer || p.IsByRef)
p = TypeManager.GetElementType (p);
-
+
+ if (TypeManager.IsGenericParameter(p))
+ return true; // FIXME
+
AccessLevel pAccess = TypeEffectiveAccessLevel (p);
AccessLevel mAccess = this.EffectiveAccessLevel &
GetAccessLevelFromModifiers (flags);