+(defun style-warn-about-duplicate-slots (class)
+ (do* ((slots (slot-value class 'slots) (cdr slots))
+ (dupes nil))
+ ((null slots)
+ (when dupes
+ (style-warn
+ "~@<slot names with the same SYMBOL-NAME but ~
+ different SYMBOL-PACKAGE (possible package problem) ~
+ for class ~S:~4I~@:_~<~@{~/sb-impl::print-symbol-with-prefix/~^~:@_~}~:>~@:>"
+ class dupes)))
+ (let* ((slot-name (slot-definition-name (car slots)))
+ (oslots (and (not (eq (symbol-package slot-name)
+ *pcl-package*))
+ (remove-if
+ (lambda (slot-name-2)
+ (or (eq (symbol-package slot-name-2)
+ *pcl-package*)
+ (string/= slot-name slot-name-2)))
+ (cdr slots)
+ :key #'slot-definition-name))))
+ (when oslots
+ (pushnew (cons slot-name
+ (mapcar #'slot-definition-name oslots))
+ dupes
+ :test #'string= :key #'car)))))
+