@Override public Boolean visit(Pos ast) { boolean checkArg = ast.getArg().accept(this); if (!checkArg) return false; Type argType = ast.getArg().typeOf(env); if (!argType.isCompatibleToNumeric()) { addToErrorList( ast, "the unary operator + can not be applied to instances of type " + argType.getClass()); return false; } return true; }