implicit generic function warning improvement
authorCyrus Harmon <ch-github@bobobeach.com>
Mon, 21 May 2012 06:22:24 +0000 (23:22 -0700)
committerCyrus Harmon <ch-github@bobobeach.com>
Mon, 21 May 2012 21:03:59 +0000 (14:03 -0700)
 the warning now prints out the package of the symbol that corresponds
 to the newly created generic function.

NEWS
src/code/condition.lisp

diff --git a/NEWS b/NEWS
index a3a9a69..283e979 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 ;;;; -*- coding: utf-8; fill-column: 78 -*-
 changes relative to sbcl-1.0.57:
+  * enchancement: implicit generic function warnings now specify the package
+    in which the new generic function is being created.
   * enhancement: SB-EXT:ATOMIC-UPDATE makes it easy to perform non-destructive
     updates of CAS-able places (similar to Clojure's swap!).
   * bug fix: potential for infinite recursion during compilation of CLOS slot
index 144062f..08f2f99 100644 (file)
   ((name :initarg :name :reader implicit-generic-function-name))
   (:report
    (lambda (condition stream)
-     (format stream "~@<Implicitly creating new generic function ~S.~:@>"
-             (implicit-generic-function-name condition)))))
+     (let ((*package* (find-package :keyword)))
+       (format stream "~@<Implicitly creating new generic function ~S.~:@>"
+               (implicit-generic-function-name condition))))))
 
 (define-condition extension-failure (reference-condition simple-error)
   ())