From 41a4ba5ef18d84fcf13ab7b0e177b5902802d264 Mon Sep 17 00:00:00 2001 From: Roman Marynchak Date: Fri, 25 Mar 2011 22:31:10 +0200 Subject: [PATCH] Signal error when SYMBOL-MACROLET bindings contain duplicates --- src/compiler/ir1-translators.lisp | 2 +- tests/compiler.pure.lisp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/compiler/ir1-translators.lisp b/src/compiler/ir1-translators.lisp index b33d94a..ae25692 100644 --- a/src/compiler/ir1-translators.lisp +++ b/src/compiler/ir1-translators.lisp @@ -289,7 +289,7 @@ Evaluate the FORMS in the specified SITUATIONS (any of :COMPILE-TOPLEVEL, (declare (type list definitions)) (unless (= (length definitions) (length (remove-duplicates definitions :key #'first))) - (compiler-style-warn "duplicate definitions in ~S" definitions)) + (compiler-error "duplicate definitions in ~S" definitions)) (let* ((processed-definitions (mapcar definitionize-fun definitions)) (*lexenv* (make-lexenv definitionize-keyword processed-definitions))) ;; I wonder how much of an compiler performance penalty this diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index c8d09ac..0ead2f3 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -3787,3 +3787,10 @@ (f (mod a e)))) s))) (g a))))) + +(with-test (:name :bug-714289) + (multiple-value-bind (function warnings-p failure-p) + (compile nil '(lambda () (symbol-macrolet ((test 1) (test 2)) test))) + (assert warnings-p) + (assert failure-p))) + -- 1.6.3.3