Subject: bug#30990: Should the byte compiler warn about :type mismatches?

From: Robert Pluim <[email-masked]>
Date: Thu, 10 Oct 2019 15:11:20 +0200

>>>>> On Wed, 09 Oct 2019 22:05:33 +0200, Lars Ingebrigtsen <[email-masked]> 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