GNU bug report logs - #73270
31.0.50; comp.el comp--type-check-optim pass causes issues

Previous Next

Package: emacs;

Reported by: Iurie Marian <marian.iurie <at> gmail.com>

Date: Sun, 15 Sep 2024 08:29:01 UTC

Severity: normal

Found in version 31.0.50

Done: Andrea Corallo <acorallo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andrea Corallo <acorallo <at> gnu.org>
To: Iurie Marian <marian.iurie <at> gmail.com>
Cc: 73270 <at> debbugs.gnu.org
Subject: bug#73270: 31.0.50; comp.el comp--type-check-optim pass causes issues
Date: Tue, 15 Oct 2024 04:35:09 -0400
Here is my minimal reproducer so far:

test.el===============
;; -*- lexical-binding: t; -*-
(require 'cl-lib)
(cl-defstruct base)
(cl-defstruct
    (child1 (:include base)))
(cl-defstruct
    (child2 (:include base)))
(cl-defstruct
    (child3 (:include base)))
(cl-defstruct
    (child4 (:include base)))

(defun foo (x)
  (message "type-of x: %S, x = %S" (type-of x) x)
  (cl-typecase x
    (child1
     (message "match: child1"))
    (child2
     (message "match: child2"))
    (child3
     (message "match: child3"))
    (child4
     (message "match: child4"))))

=============

(progn
  (load (native-compile "test.el"))
  (foo (make-child4)))

evaluates to : "match: child3"

I'm looking into it.

  Andrea




This bug report was last modified 210 days ago.

Previous Next


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