emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warn about comparing quoted lists (etc) using `eq`


From: Juanma Barranquero
Subject: Re: Warn about comparing quoted lists (etc) using `eq`
Date: Thu, 15 Dec 2022 05:17:13 +0100

Note that your patch has a false positive with the empty string, which is optimized to be always the same object (well, ISTR there are two, a unibyte one and a multibyte one).

(byte-compile '(let ((x "")) (eq x "")))   =>   Warning: `eq' called with literal string that may never match (arg 2)

(let ((x "")) (eq x "")) => t


reply via email to

[Prev in Thread] Current Thread [Next in Thread]