From 1effa6a16052215bd2a5a64351a3cb0daf8700b6 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Fri, 6 Nov 2020 20:35:22 +0100 Subject: [PATCH] predlib.lsp: fix type comparisons involving gray streams Due to gray:fundamental-stream being treated as a built-in type, subclass relationships were not checked (see added test case). Fixes #614. --- src/lsp/predlib.lsp | 1 - src/tests/normal-tests/compiler.lsp | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lsp/predlib.lsp b/src/lsp/predlib.lsp index b3778933..b28ea038 100644 --- a/src/lsp/predlib.lsp +++ b/src/lsp/predlib.lsp @@ -1351,7 +1351,6 @@ if not possible." (EXT:ANSI-STREAM (OR BROADCAST-STREAM CONCATENATED-STREAM ECHO-STREAM FILE-STREAM STRING-STREAM SYNONYM-STREAM TWO-WAY-STREAM EXT:SEQUENCE-STREAM)) - #+clos-streams (GRAY:FUNDAMENTAL-STREAM) (STREAM (OR EXT:ANSI-STREAM #+clos-streams GRAY:FUNDAMENTAL-STREAM)) (EXT:VIRTUAL-STREAM (OR STRING-STREAM #+clos-streams GRAY:FUNDAMENTAL-STREAM)) diff --git a/src/tests/normal-tests/compiler.lsp b/src/tests/normal-tests/compiler.lsp index c0b05120..aafc150f 100644 --- a/src/tests/normal-tests/compiler.lsp +++ b/src/tests/normal-tests/compiler.lsp @@ -76,9 +76,13 @@ ;;; ;;; There is a problem with SUBTYPEP and type STREAM ;;; +(defclass gray-stream-test (gray:fundamental-character-output-stream) ()) (test cmp.0005.subtypep-stream (is (equal (multiple-value-list (subtypep (find-class 'gray:fundamental-stream) 'stream)) + (list t t))) + (is (equal (multiple-value-list + (subtypep (find-class 'gray-stream-test) 'stream)) (list t t)))) ;;; Date: 09/07/2006 (Tim S)