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


View this message in rfc822 format

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: alex.branham <at> gmail.com, Stefan Kangas <stefan <at> marxist.se>, 30990 <at> debbugs.gnu.org
Subject: bug#30990: Should the byte compiler warn about :type mismatches?
Date: Thu, 10 Oct 2019 15:11:20 +0200
>>>>> On Wed, 09 Oct 2019 22:05:33 +0200, Lars Ingebrigtsen <larsi <at> gnus.org> said:

    Lars> Oh, I missed this bit in the sql code;
    Lars>     (dolist (ext '(".json.gpg" ".gpg" ".json" "") wallet)

    Lars> So `wallet' is returned and the code is fine...

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

Robert




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.