public bool isDerivedFromAnonymous(Context context, CategoryDeclaration thisDecl, CategoryType other) { if (!other.isAnonymous()) { return(false); } try { IDeclaration otherDecl = other.getDeclaration(context); if (otherDecl is CategoryDeclaration) { return(isDerivedFromAnonymous(context, thisDecl, (CategoryDeclaration)otherDecl)); } } catch (SyntaxError) { } return(false); // TODO }
public override bool isMoreSpecificThan(Context context, IType other) { if (other is NullType || other is AnyType || other is MissingType) { return(true); } if (!(other is CategoryType)) { return(false); } CategoryType otherCat = (CategoryType)other; if (otherCat.isAnonymous()) { return(true); } CategoryDeclaration thisDecl = context.getRegisteredDeclaration <CategoryDeclaration>(this.GetTypeName()); if (thisDecl.isDerivedFrom(context, otherCat)) { return(true); } return(false); }