diff --git a/src/mes.c b/src/mes.c index 6f3c4a51..e66f6b00 100644 --- a/src/mes.c +++ b/src/mes.c @@ -661,7 +661,7 @@ append_reverse (SCM x, SCM y) SCM reverse_x_ (SCM x, SCM t) { - if (TYPE (x) != TPAIR) + if (x != cell_nil && TYPE (x) != TPAIR) error (cell_symbol_not_a_pair, cons (x, cell_reverse_x_)); SCM r = t; while (x != cell_nil) diff --git a/tests/scm.test b/tests/scm.test index bb4c2cc4..a01465e8 100755 --- a/tests/scm.test +++ b/tests/scm.test @@ -137,6 +137,9 @@ exit $? (reverse! list) list)) +(pass-if-equal "reverse! ()" '() + (reverse! '())) + (pass-if "cond-expand" (sequal? (cond-expand (foobar #f) (mes (display ": pass: *YAY*") 'mes) (guile (display ": pass: *GUILE*") 'mes)) 'mes)) (pass-if "apply identity" (seq? (apply identity '(0)) 0))