Subject: bug#29220: 26.0.90; eieio-persistent-read fail to restore saved object.

From: Eric Abrahamsen <[email-masked]>
Date: Sat, 16 Dec 2017 15:42:48 -0800

On 12/15/17 23:26 PM, Pierre Téchoueyres wrote:
> Of course with the good example and patch this will be more obvious.

Oh bother, this is my fault, in c59ddb2120. The attached diff fixes
this, and I guess should be put in.

In #29541 I was hoping to reduce some of this complexity and make the
code easier to reason about, but those changes would go into master, and
this needs to be fixed in 26.

More tests are definitely in order!

diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index 0241f27395..a37cf7a1b3 100644
--- a/lisp/emacs-lisp/eieio-base.el
+++ b/lisp/emacs-lisp/eieio-base.el
@@ -349,7 +349,7 @@ eieio-persistent-validate/fix-slot-value
                        (seq-some
                         (lambda (elt)
                           (child-of-class-p (car proposed-value) elt))
-                        classtype))
+                        (if (consp classtype) classtype (list classtype))))
 		  (eieio-persistent-convert-list-to-object
 		   proposed-value))
 		 (t