aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2023-05-24 17:05:26 +0200
committerAndrea Corallo2023-05-24 17:20:38 +0200
commitb2b2be98da5825e6bc130999ffe38f5ed615586a (patch)
tree8b1550d91479d86a081c9a8308dad95f28432abf /test/src
parentb513036770499cf7981957d6f5f1626b0b5ef45d (diff)
downloademacs-b2b2be98da5825e6bc130999ffe38f5ed615586a.tar.gz
emacs-b2b2be98da5825e6bc130999ffe38f5ed615586a.zip
Fix nativecomp ICE compiling structure related code (bug#63674)
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Define the predicate to be effective at compile time as native comp relies on `cl-typep' that relies o predicates to work. * test/src/comp-resources/comp-test-funcs.el (cl-lib): Require. (comp-test-struct): Define struct. (comp-test-63674-1-f): Add new test.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-resources/comp-test-funcs.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/comp-resources/comp-test-funcs.el b/test/src/comp-resources/comp-test-funcs.el
index 73da7182a54..d8c72c1a920 100644
--- a/test/src/comp-resources/comp-test-funcs.el
+++ b/test/src/comp-resources/comp-test-funcs.el
@@ -23,6 +23,8 @@
23 23
24;;; Code: 24;;; Code:
25 25
26(require 'cl-lib)
27
26(defvar comp-tests-var1 3) 28(defvar comp-tests-var1 3)
27 29
28(defun comp-tests-varref-f () 30(defun comp-tests-varref-f ()
@@ -530,6 +532,12 @@
530 (comp-test-62537-1-f)) 532 (comp-test-62537-1-f))
531 t) 533 t)
532 534
535(cl-defstruct comp-test-struct)
536
537(defun comp-test-63674-1-f (x)
538 (or
539 (if (comp-test-struct-p pkg) x)
540 t))
533 541
534 542
535;;;;;;;;;;;;;;;;;;;; 543;;;;;;;;;;;;;;;;;;;;