GNU bug report logs - #30990
Should the byte compiler warn about :type mismatches?

Previous Next

Package: emacs;

Reported by: Alex Branham <alex.branham <at> gmail.com>

Date: Thu, 29 Mar 2018 16:56:02 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 30990 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: alex.branham <at> gmail.com
Cc: 30990 <at> debbugs.gnu.org, Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#30990: Should the byte compiler warn about :type mismatches?
Date: Fri, 11 Oct 2019 07:54:00 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

> Except that the underlying type is '(repeat ....) so I wonder if this:
>
>     (dolist (ext '(".json.gpg" ".gpg" ".json" "") wallet)
>       (unless wallet
>         (setq w (locate-user-emacs-file (concat "sql-wallet" ext)
>                                         (concat ".sql-wallet" ext)))
>         (when (file-exists-p w)
>           (setq wallet w))))) ; <= this returns a string
>
> should use (setq wallet (list w)) instead

Indeed.  It looks like this is where it's used:

(defun sql-auth-source-search-wallet (wallet product user server database port)

[...]

    (let* ((auth-sources wallet)

and auth-source-search assumes that auth-sources is a list of
... things, not a string:

(cl-defun auth-source-search (&rest spec
                              &key max require create delete
                              &allow-other-keys)

[...]

  (let* ((backends (mapcar #'auth-source-backend-parse auth-sources))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.