gnumake=${GNUMAKE:-gmake}
+mkdir -p contrib/systems
+rm -f contrib/systems/*
+
+for i in contrib/*/*.asd; do
+ ln -sf ../../$i contrib/systems/
+done
+
for i in contrib/*; do
test -d $i && test -f $i/Makefile || continue;
# export INSTALL_DIR=$SBCL_HOME/`basename $i `
;; weirdness when bootstrapping.. -- WHN 20000610
'(ignorable))
(t
- ;; Otherwise, we can make Python very happy.
+ ;; Otherwise, we can usually make Python very happy.
(let ((type (info :type :kind specializer)))
(ecase type
((:primitive :defined :instance :forthcoming-defclass-type)
`(type ,specializer ,parameter))
((nil)
- `(type ,(class-name (find-class specializer)) ,parameter)))))))
+ (let ((class (find-class specializer nil)))
+ (if class
+ `(type ,(class-name class) ,parameter)
+ (progn
+ ;; we can get here, and still not have a failure
+ ;; case, by doing MOP programming like (PROGN
+ ;; (ENSURE-CLASS 'FOO) (DEFMETHOD BAR ((X FOO))
+ ;; ...)). Best to let the user know we haven't
+ ;; been able to extract enough information:
+ (style-warn
+ "~@<can't find type for presumed class ~S in ~S.~@:>"
+ specializer
+ 'parameter-specializer-declaration-in-defmethod)
+ '(ignorable))))))))))
(defun make-method-lambda-internal (method-lambda &optional env)
(unless (and (consp method-lambda) (eq (car method-lambda) 'lambda))
(defmethod baz ((x specializer2)) x)
(defmethod baz ((x specializer1)) x)
(assert (typep (baz (make-instance 'specializer1)) 'specializer1))
+
+;;; in a similar vein, we should be able to define methods on classes
+;;; that are effectively unknown to the type system:
+(sb-mop:ensure-class 'unknown-type)
+(defmethod method ((x unknown-type)) x)
+;;; (we can't call it without defining methods on allocate-instance
+;;; etc., but we should be able to define it).
\f
;;; success
(sb-ext:quit :unix-status 104)
\ No newline at end of file