emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#34781: closed (27.0.50; integer in pcase sometimes


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#34781: closed (27.0.50; integer in pcase sometimes compared by eq)
Date: Thu, 28 Mar 2019 23:04:02 +0000

Your message dated Fri, 29 Mar 2019 00:03:01 +0100
with message-id <address@hidden>
and subject line Re: 27.0.50; integer in pcase sometimes compared by eq
has caused the debbugs.gnu.org bug report #34781,
regarding 27.0.50; integer in pcase sometimes compared by eq
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
34781: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34781
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; integer in pcase sometimes compared by eq Date: Thu, 07 Mar 2019 16:13:27 +0100 User-agent: Evolution 3.30.5 (3.30.5-1.fc29)
(defun f (x)
  (pcase x
    ((or 'a #x10000000000000000) t)))

(f #x10000000000000000) => nil

Just replacing integerp with fixnump fixes this, but I'm not sure if
more of the same lurks somewhere.

--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -792,7 +792,7 @@ pcase--u1
                    (let ((upat (cddr alt)))
                      (eq (car-safe upat) 'quote)))
               (let ((val (cadr (cddr alt))))
-                (unless (or (integerp val) (symbolp val))
+                (unless (or (fixnump val) (symbolp val))
                   (setq memq-ok nil))
                 (push (cadr (cddr alt)) simples))
             (push alt others))))





--- End Message ---
--- Begin Message --- Subject: Re: 27.0.50; integer in pcase sometimes compared by eq Date: Fri, 29 Mar 2019 00:03:01 +0100 User-agent: Evolution 3.30.5 (3.30.5-1.fc29)
tor 2019-03-28 klockan 15:38 -0700 skrev Paul Eggert:
> On 3/28/19 3:20 PM, Mattias EngdegÄrd wrote:
> > I'll do the obvious (unless you beat me to it).
> 
> When you do that, please also change the name of the local from memq-
> ok
> to memql-ok, for clarity. Thanks.

Done. Thanks for your help! I'm attaching the mostly cleaned-up patch
(minus the necessary doc changes), in case someone will see some use
for it.

Attachment: 0001-Add-bounds-for-portable-fixnums-and-portable-fixnum-.patch
Description: Text Data


--- End Message ---

reply via email to

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