Commit 418d48ea authored by Robert Goldman's avatar Robert Goldman
Browse files

Fix initial value assignment.

In some contexts, ITERATE could incorrectly warn that it is assigning a default initial value of `NIL`. Here we filter out cases where supplying `NIL` is fine, and no warning should be raised.
parent 75612575
......@@ -1873,6 +1873,9 @@ Evaluate (iterate:display-iterate-clauses) for an overview of clauses"
(coerce nil type))
((subtypep type 'character)
(coerce (code-char 0) type)) ; Neither #\Null nor #\Nul are valid characters.
;; is NIL an acceptable initial value? If so, use it.
((subtypep 'null type)
(coerce nil type))
(t
(clause-warning
"Cannot supply an initial value for type ~s; using NIL."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment