diff --git a/ansi-tests/concatenate.lsp b/ansi-tests/concatenate.lsp index 2911e2794703af4333344c83257be61e4d9a53d7..f9384490b2198af6360ba89ac403f2ca29ea246f 100644 --- a/ansi-tests/concatenate.lsp +++ b/ansi-tests/concatenate.lsp @@ -312,6 +312,7 @@ t) (deftest concatenate.error.6 + :notes (:result-type-element-type-by-subtype) (let ((type '(or (vector bit) (vector t)))) (if (subtypep type 'vector) (eval `(signals-error-always (concatenate ',type '(0 1 0) '(1 1 0)) error)) diff --git a/ansi-tests/make-sequence.lsp b/ansi-tests/make-sequence.lsp index a1cc952f09a8ba45e43498c6e3f51d27a4cb49bc..5086099ee97f4010017bc67beba8daf47a9d64ad 100644 --- a/ansi-tests/make-sequence.lsp +++ b/ansi-tests/make-sequence.lsp @@ -470,6 +470,7 @@ t t) (deftest make-sequence.error.15 + :notes (:result-type-element-type-by-subtype) (if (subtypep '(or (vector bit) (vector t)) 'vector) (signals-error (make-sequence '(or (vector bit) (vector t)) 10 :initial-element 0) type-error) t) diff --git a/ansi-tests/map.lsp b/ansi-tests/map.lsp index f0ecd4f925514b070b56bf00ee31285d5cdd4c77..bf2028461d103e061378d97ecd94eaff44006c9c 100644 --- a/ansi-tests/map.lsp +++ b/ansi-tests/map.lsp @@ -254,6 +254,7 @@ t) (deftest map.error.10 + :notes (:result-type-element-type-by-subtype) (let ((type '(or (vector bit) (vector t)))) (if (subtypep type 'vector) (eval `(signals-error-always (map ',type #'identity '(1 0 1)) error)) @@ -384,7 +385,7 @@ for result = (map `(vector ,type) #'identity vals) unless (and (= (length result) len) (every #'eql vals result)) - collect (list i vals result)) + collect (list type vals result)) nil) (deftest map.specialized-vector.7 @@ -397,7 +398,7 @@ for result = (map `(vector ,type) #'identity vals) unless (and (= (length result) len) (every #'eql vals result)) - collect (list i vals result)) + collect (list type vals result)) nil) ;;; Order of evaluation tests diff --git a/ansi-tests/notes.lsp b/ansi-tests/notes.lsp index 9dfa70c3199f4d66c1fd229419d2e37a177a6260..72a1180ff5b1a1bb678c15f24e16e780b0db12a1 100644 --- a/ansi-tests/notes.lsp +++ b/ansi-tests/notes.lsp @@ -18,7 +18,8 @@ "The standardized package nicknames specified in section 11 of ANSI CL are exclusive (disputed).") (defnote :type-of/strict-builtins - "Interpret requirement 1.a on the TYPE-OF page to apply to all built-in types that contain the object, not just to some builtin type that contains the object.") + "Interpret requirement 1.a on the TYPE-OF page to apply to all built-in types that +contain the object, not just to some builtin type that contains the object.") (defnote :assume-no-gray-streams "Disable the test if gray streams are present.") @@ -32,4 +33,12 @@ #+sbcl (rt::disable-note :open-if-exists-new-version-no-error) (defnote :negative-zero-is-similar-to-positive-zero - "The definition of similarity implies that -0.0 and 0.0 are similar (for each float type.) If negative zeros are distinct this is probably not good, since it makes (defconstant x 0.0) be nonportable.") + "The definition of similarity implies that -0.0 and 0.0 are similar (for each float type.) +If negative zeros are distinct this is probably not good, since it makes (defconstant x 0.0) be nonportable.") + +(defnote :result-type-element-type-by-subtype + "Assume that (for sequence functions MAP, etc.) the element type of a vector result type + is defined to be the type X such that result-type is a subtype of (vector X).") + +;;; Haible disagrees with :result-type-element-type-by-subtype +#+clisp (rt::disable-note :result-type-element-type-by-subtype)