GNU bug report logs - #25558
Spurious warnings with variables mentioned only pcase guard patterns

Previous Next

Package: emacs;

Reported by: Clément Pit--Claudel <clement.pitclaudel <at> live.com>

Date: Sat, 28 Jan 2017 00:16:02 UTC

Severity: minor

Tags: confirmed

Merged with 16771, 27545

Found in versions 24.3.50, 25.1

Fixed in version 28.1

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: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Yuri Khan <yuri.v.khan <at> gmail.com>
Cc: 27545 <at> debbugs.gnu.org, 25558 <at> debbugs.gnu.org
Subject: bug#25558: Spurious warnings with variables mentioned only pcase guard patterns
Date: Fri, 03 Sep 2021 10:49:09 +0200
Yuri Khan <yuri.v.khan <at> gmail.com> writes:

> C-x C-f test.el RET
>
> ;; -*- lexical-binding: t -*-
>
> (defun foo (x)
>   (pcase x
>     ((and `(,bar ,baz)
>           (guard (eq bar 'quux)))
>      baz)))
>
> C-x C-s
> M-x byte-compile RET test.el RET
>
> Observed output:
>
> Compiling file /home/yuri/test.el at Sat Jul  1 16:27:36 2017
> test.el:3:1:Warning: Unused lexical variable ‘bar’

I can reproduce this in Emacs 26.1, but not in Emacs 28, so I'm guessing
that this is fixed, and I'm closing this bug report.  If there's still
problems here, please respond to the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 263 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.