show correct number of arguments for arg-count error frames
[sbcl.git] / tests / debug.impure.lisp
index d9de575..208cbe8 100644 (file)
       (throw 'no-such-tag t))
     (assert (verify-backtrace #'throw-test '((throw-test))))))
 
+(defun bug-308926 (x)
+  (let ((v "foo"))
+    (flet ((bar (z)
+             (oops v z)
+             (oops z v)))
+      (bar x)
+      (bar v))))
+
+(with-test (:name :bug-308926)
+  (assert (verify-backtrace (lambda () (bug-308926 13))
+                            '(((flet bar :in bug-308926) 13)
+                              (bug-308926 &rest t)))))
+
 ;;; test entry point handling in backtraces
 
 (defun oops ()
   (error "oops"))
 
+(with-test (:name :xep-too-many-arguments)
+  (assert (verify-backtrace (lambda () (oops 1 2 3 4 5 6))
+                            '((oops ? ? ? ? ? ?)))))
+
 (defmacro defbt (n ll &body body)
   `(progn
      ;; normal debug info