From 0a397b5d50ae391028b08d51893d8bba09a2a82f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= <daniel@turtleware.eu>
Date: Tue, 1 Aug 2017 10:12:29 +0200
Subject: [PATCH] equalp: add new test for instances

---
 data-and-control-flow/equalp.lsp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/data-and-control-flow/equalp.lsp b/data-and-control-flow/equalp.lsp
index de1bad0d..1b00b8da 100644
--- a/data-and-control-flow/equalp.lsp
+++ b/data-and-control-flow/equalp.lsp
@@ -282,6 +282,16 @@
                   (not (equalp ht1 ht2))))))
   (0 0 0 0))
 
+(defclass equalp-class-36 () ((slot1 :initarg :slot1) (slot2 :initarg :slot2)))
+
+;;; If structure is baked up by an instance, it may happen that
+;;; instances are compared like structures for `equalp' - slot by
+;;; slot. This was a problem in ECL 16.1.3.
+(deftest equalp.36
+    (equalp (make-instance 'test-object :slot1 1 :slot2 2)
+            (make-instance 'test-object :slot1 1 :slot2 2))
+  nil)
+
 (deftest equalp.order.1
   (let ((i 0) x y)
     (values
-- 
GitLab