Issue #552 - Error if no match cond-expand clause

This commit is contained in:
Justin Ethier 2025-01-14 22:38:39 -05:00
parent 398f8e91d6
commit 2ed57ab24d
2 changed files with 2 additions and 1 deletions

View file

@ -407,7 +407,7 @@
(else (error "cond-expand: bad feature" x))) (else (error "cond-expand: bad feature" x)))
(memq x (features)))) (memq x (features))))
(let expand ((ls (cdr expr))) (let expand ((ls (cdr expr)))
(cond ((null? ls)) ; (error "cond-expand: no expansions" expr) (cond ((null? ls) (error "cond-expand: no expansions" expr))
((not (pair? (car ls))) (error "cond-expand: bad clause" (car ls))) ((not (pair? (car ls))) (error "cond-expand: bad clause" (car ls)))
((eq? 'else (caar ls)) ;(identifier->symbol (caar ls))) ((eq? 'else (caar ls)) ;(identifier->symbol (caar ls)))
(if (pair? (cdr ls)) (if (pair? (cdr ls))

View file

@ -54,6 +54,7 @@
(test "o" (read-line p)) (test "o" (read-line p))
) )
) )
(else #f)
) )
(test-group (test-group