public static bool IsFamilyAccessible (TypeSpec type, TypeSpec parent)
{
// TypeParameter tparam = LookupTypeParameter (type);
// TypeParameter pparam = LookupTypeParameter (parent);
if (type.Kind == MemberKind.TypeParameter && parent.Kind == MemberKind.TypeParameter) { // (tparam != null) && (pparam != null)) {
if (type == parent)
return true;
throw new NotImplementedException ("net");
// return tparam.IsSubclassOf (parent);
}
do {
if (IsInstantiationOfSameGenericType (type, parent))
return true;
type = type.BaseType;
} while (type != null);
return false;
}