private void checkAbstractOnly(Context context, IMethodDeclaration declaration) { if (declaration.IsReference()) // parameter or variable populated from a method call { return; } if (declaration.getMemberOf() != null) // the category could be subclassed (if constructor called on abstract, that would raise an error anyway) { return; } // if a global method, need to check for runtime dispatch MethodFinder finder = new MethodFinder(context, this); ISet <IMethodDeclaration> potential = finder.findPotential(); if (potential.All(decl => decl.isAbstract())) { throw new SyntaxError("Cannot call abstract method: " + declaration.getSignature(Dialect.O)); } }
public virtual bool IsReference() { return(wrapped.IsReference()); }