X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fctor.impure.lisp;h=12c1f896b0b1384db798a0b692df0082d115aa18;hb=1f03c7f326823245708a84af86b31ac72bdb1742;hp=08a41c660c15d743037aa7174b08eaf7b961bdf7;hpb=f09f67b4233004079affc70de2ef2d49f27ca91a;p=sbcl.git diff --git a/tests/ctor.impure.lisp b/tests/ctor.impure.lisp index 08a41c6..12c1f89 100644 --- a/tests/ctor.impure.lisp +++ b/tests/ctor.impure.lisp @@ -217,5 +217,25 @@ (handler-bind ((sb-ext:compiler-note #'error)) (funcall fun 41) (funcall fun 13)))) + +;;; NO-APPLICABLE-METHOD called +(defmethod no-applicable-method ((gf (eql #'make-instance)) &rest args) + (cons :no-applicable-method args)) +(with-test (:name :constant-invalid-class-arg) + (assert (equal + '(:no-applicable-method "FOO" :quux 14) + (funcall (compile nil `(lambda (x) (make-instance "FOO" :quux x))) 14))) + (assert (equal + '(:no-applicable-method 'abc zot 1 bar 2) + (funcall (compile nil `(lambda (x y) (make-instance ''abc 'zot x 'bar y))) + 1 2)))) +(with-test (:name :variable-invalid-class-arg) + (assert (equal + '(:no-applicable-method "FOO" :quux 14) + (funcall (compile nil `(lambda (c x) (make-instance c :quux x))) "FOO" 14))) + (assert (equal + '(:no-applicable-method 'abc zot 1 bar 2) + (funcall (compile nil `(lambda (c x y) (make-instance c 'zot x 'bar y))) + ''abc 1 2)))) ;;;; success