public bool CheckAccessLevel (Type check_type)
{
- TypeBuilder tb = TypeBuilder;
+ Type tb = TypeBuilder;
#if GMCS_SOURCE
if (this is GenericMethod) {
tb = Parent.TypeBuilder;
if (check_type == tb)
return true;
+ // TODO: When called from LocalUsingAliasEntry tb is null
+ // because we are in RootDeclSpace
+ if (tb == null)
+ tb = typeof (RootDeclSpace);
+
//
// Broken Microsoft runtime, return public for arrays, no matter what
// the accessibility is for their underlying class, and they return