[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b5c8e98 6/8: Let the cl-typep effects of defclass w
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master b5c8e98 6/8: Let the cl-typep effects of defclass work during compilation (Bug#27718) |
Date: |
Mon, 7 Aug 2017 21:09:41 -0400 (EDT) |
branch: master
commit b5c8e9898d9dbd4145c40d08e8eef84a5e32008a
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Let the cl-typep effects of defclass work during compilation (Bug#27718)
* lisp/emacs-lisp/eieio.el (defclass): Use `define-symbol-prop'
instead of `put'.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-tests--dummy-function): Remove.
(eieio-test-25-slot-tests, eieio-test-23-inheritance-check): Don't
expect to fail if compiled.
---
lisp/emacs-lisp/eieio.el | 2 +-
test/lisp/emacs-lisp/eieio-tests/eieio-tests.el | 12 ------------
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 1a7de55..8b92d5b 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -246,7 +246,7 @@ This method is obsolete."
;; test, so we can let typep have the CLOS documented behavior
;; while keeping our above predicate clean.
- (put ',name 'cl-deftype-satisfies #',testsym2)
+ (define-symbol-prop ',name 'cl-deftype-satisfies #',testsym2)
(eieio-defclass-internal ',name ',superclasses ',slots
',options-and-doc)
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
index d824bfc..1a6ab9d 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
@@ -529,15 +529,7 @@ METHOD is the method that was attempting to be called."
"This class should break."))
:type 'invalid-slot-type))
-(defun eieio-tests--dummy-function ()
- ;; Dummy function to see if the file is compiled.
- t)
-
(ert-deftest eieio-test-23-inheritance-check ()
- ;; This test fails when compiled, see Bug#27718.
- :expected-result (if (byte-code-function-p
- (symbol-function 'eieio-tests--dummy-function))
- :failed :passed)
(should (child-of-class-p 'class-ab 'class-a))
(should (child-of-class-p 'class-ab 'class-b))
(should (object-of-class-p eitest-a 'class-a))
@@ -556,10 +548,6 @@ METHOD is the method that was attempting to be called."
(should (not (cl-typep "foo" 'class-a))))
(ert-deftest eieio-test-24-object-predicates ()
- ;; This test fails when compiled, see Bug#27718.
- :expected-result (if (byte-code-function-p
- (symbol-function 'eieio-tests--dummy-function))
- :failed :passed)
(let ((listooa (list (class-ab) (class-a)))
(listoob (list (class-ab) (class-b))))
(should (cl-typep listooa '(list-of class-a)))
- [Emacs-diffs] master updated (e6fa083 -> bec5b60), Noam Postavsky, 2017/08/07
- [Emacs-diffs] master 00f7e31 4/8: Add a test of handling of circular values to testcover-tests, Noam Postavsky, 2017/08/07
- [Emacs-diffs] master 95a04fd 2/8: ; Avoid test failures when running from compiled test files, Noam Postavsky, 2017/08/07
- [Emacs-diffs] master cc30d77 5/8: Let `define-symbol-prop' take effect during compilation, Noam Postavsky, 2017/08/07
- [Emacs-diffs] master b5c8e98 6/8: Let the cl-typep effects of defclass work during compilation (Bug#27718),
Noam Postavsky <=
- [Emacs-diffs] master 054c198 1/8: Catch argument and macroexpansion errors in ert, Noam Postavsky, 2017/08/07
- [Emacs-diffs] master 0508045 3/8: Don't error on circular values in testcover, Noam Postavsky, 2017/08/07
- [Emacs-diffs] master 79a7456 7/8: Don't define gv expanders in compiler's runtime (Bug#27016), Noam Postavsky, 2017/08/07
- [Emacs-diffs] master bec5b60 8/8: ; Merge: Fixes for macroexpansion and compilation, Noam Postavsky, 2017/08/07