From c5d49a98212cf02fbfd0dd7f58a6177142c1c4a9 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sun, 20 Feb 2011 10:38:12 +0000 Subject: [PATCH] 1.0.46.7: better error message for an invalid lambda in COMPILE, etc Patch by Roman Marynchak, lp#718905. Make the error from NAME-LAMBDALIKE clearer. --- NEWS | 2 ++ src/compiler/ir1-translators.lisp | 7 +++++-- version.lisp-expr | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index ccb69b6..ba3c986 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ changes relative to sbcl-1.0.46: stack-allocated values out of their dynamic-extent. (lp#310175) * bug fix: attempts to use SB-SPROF for wallclock profiling on threaded x86-64 builds caused a type-error. + * bug fix: calling COMPILE with something else than a lambda-expression as the + second argument reports a more sensible error. (lp#718905) changes in sbcl-1.0.46 relative to sbcl-1.0.45: * enhancement: largefile support on Solaris. diff --git a/src/compiler/ir1-translators.lisp b/src/compiler/ir1-translators.lisp index 347c907..74831c2 100644 --- a/src/compiler/ir1-translators.lisp +++ b/src/compiler/ir1-translators.lisp @@ -473,14 +473,17 @@ Return VALUE without evaluating it." ;;;; FUNCTION and NAMED-LAMBDA (defun name-lambdalike (thing) - (ecase (car thing) + (case (car thing) ((named-lambda) (or (second thing) `(lambda ,(third thing)))) ((lambda instance-lambda) `(lambda ,(second thing))) ((lambda-with-lexenv) - `(lambda ,(fifth thing))))) + `(lambda ,(fifth thing))) + (otherwise + (compiler-error "Not a valid lambda expression:~% ~S" + thing)))) (defun fun-name-leaf (thing) (if (consp thing) diff --git a/version.lisp-expr b/version.lisp-expr index 7e0791f..c6e6b0b 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -20,4 +20,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.46.6" +"1.0.46.7" -- 1.7.10.4