From 1fc53cc336bf03c52a438bb237d95080f00dd203 Mon Sep 17 00:00:00 2001
From: Raymond Toy <toy.raymond@gmail.com>
Date: Fri, 28 Nov 2014 10:40:20 -0800
Subject: [PATCH] Signal an error for an invalid :allocation value for a slot.

Fixes ticket:95, along with changeset:[2b39eb]
---
 src/pcl/std-class.lisp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/pcl/std-class.lisp b/src/pcl/std-class.lisp
index 1d4049dcd..3f247f295 100644
--- a/src/pcl/std-class.lisp
+++ b/src/pcl/std-class.lisp
@@ -435,7 +435,12 @@
 	       slot-name)
 	    else do
 	      (loop for (option value . more) on slot by #'cddr
-		    if (and (member option '(:allocation :type :initform
+		    if (and (eq option :allocation)
+			    (not (member value '(:class :instance)))) do
+		      (simple-program-error
+		       "~@<Slot ~S: :allocation value must be :class or :instance, not ~S~@:>"
+		       slot-name value)
+		    else if (and (member option '(:type :initform
 					     :documentation))
 			    (not (eq unsupplied
 				     (getf more option unsupplied)))) do
-- 
GitLab