< Support Home
unevaluated defun form signals an error and exits the REPL.
by informatimago on 2013-10-19 (1228 days ago)
Summary: In the REPL, it looks like defun has compile-time effects even when it's not a toplevel form and even when it's not evaluated. Steps to Reproduce: [pjb@kuiper :0.0 ansi-tests]$ mocl repl --ios /tmp This repl is an experimental work in progress. See documentation for further details. You can quit this repl via (rt:quit). * (fboundp 'sin) T * (fboundp 'compile-file-pathname) T * (unless (fboundp 'compile-file-pathname) (defun compile-file-pathname (pathname) (make-pathname :defaults pathname :type "o"))) Error in form (RT::%DEFUN '(COMPILE-FILE-PATHNAME (PATHNAME) (MAKE-PATHNAME :DEFAULTS PATHNAME :TYPE "o"))) -> Redefining built-in function COMPILE-FILE-PATHNAME [pjb@kuiper :0.0 ansi-tests]$ Expected Results: - No error, since the defun form should not be evaluated. - in case of error, no exit from the REPL. Actual Results: - Got an error - mocl exited from the REPL. Notes:
to add a comment.