diff --git a/src/code/loop.lisp b/src/code/loop.lisp index 29b9c23f0d8881445f146716e4057c8327289504..8e50390b7d73bd4bf61675a05c4f183e01a7eef0 100644 --- a/src/code/loop.lisp +++ b/src/code/loop.lisp @@ -2168,6 +2168,8 @@ collected result will be returned as the value of the LOOP." (cond ((or (cdr prep-phrases) (not (member (caar prep-phrases) '(:in :of)))) (loop-error _N"Too many prepositions!")) ((null prep-phrases) (loop-error _N"Missing OF or IN in ~S iteration path."))) + (unless (symbolp variable) + (loop-error _N"Destructuring is not valid for string codepoint iteration.")) (let ((string-var (loop-gentemp 'loop-codepoint-string-)) (next-fn (loop-gentemp 'loop-codepoint-next-)) (post-steps nil)) @@ -2201,6 +2203,8 @@ collected result will be returned as the value of the LOOP." (cond ((or (cdr prep-phrases) (not (member (caar prep-phrases) '(:in :of)))) (loop-error _N"Too many prepositions!")) ((null prep-phrases) (loop-error _N"Missing OF or IN in ~S iteration path."))) + (unless (symbolp variable) + (loop-error _N"Destructuring is not valid for string glyph iteration.")) (let ((string-var (loop-gentemp 'loop-glyph-string-)) (next-fn (loop-gentemp 'loop-glyph-next-)) (post-steps nil))