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

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

bug#71503: 30.0.50; pcase-lambda (with "and" and "guard") does not work


From: Mekeor Melire
Subject: bug#71503: 30.0.50; pcase-lambda (with "and" and "guard") does not work as expected
Date: Wed, 12 Jun 2024 08:40:54 +0000

I was expecting these two expressions to evaluate to the same value.
First, we call `pcase' on a value with a pattern involving `and' and
`guard':

    (pcase "value"
      ((and v (guard (string= "not-value" v))) v))
    ;; => nil

Second, let's use the same value and pattern, but this time using
`pcase-lambda':

    (funcall
      (pcase-lambda
        ((and v (guard (string= "not-value" v)))) v)
      "value")
    ;; => "value"

Am I missing something or is this a bug?

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.16.0).





reply via email to

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