]> git.eshelyaron.com Git - emacs.git/commit
Fix slot typecheck in eieio-persistent
authorEric Abrahamsen <eric@ericabrahamsen.net>
Sat, 30 Sep 2017 17:57:52 +0000 (10:57 -0700)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Sat, 30 Sep 2017 23:28:00 +0000 (16:28 -0700)
commitc59ddb212055609ec0c402708a2514ee6a30e836
treef947e55c19617feba81f1115e926bcf6eaad7df7
parent8b2ab5014b2c1641bb62efa63b9ee54b4c056b5a
Fix slot typecheck in eieio-persistent

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
  An `or' form can specify multiple potential classes (or null) as
  valid types for a slot, but previously only the final element of the
  `or' was actually checked. Now returns all valid classes in the `or'
  form.
  (eieio-persistent-validate/fix-slot-value): Check if proposed value
  matches any of the valid classes.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
  (eieio-test-multiple-class-slot): Test this behavior.
lisp/emacs-lisp/eieio-base.el
test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el