Max Rottenkolber
10/6/2015 10:24:00 PM
Hi c.l.l,
I stumbled upon a behavior today that I am unable to explain. Given the
following definitions
(defpackage test
(:use :cl)
(:export :foo))
(defun test:foo () :bar)
(defpackage test2
(:use :cl :test)
(:export :foo))
if I re-define TEST2 and define TEST2:FOO as follows
(defpackage test2
(:use :cl :test)
(:shadow :foo)
(:export :foo))
(defun test2:foo () (test:foo))
then calling TEST2:FOO will â??hangâ? (if you try it, do it somewhere where
you can C-c it, e.g. a Slime REPL). My guess is that TEST2:FOO was
defined to be a recursive function calling itself. I tested this on
Clozure CL 1.10 and CMUCL 21a, both exhibit this behavior.
I do not immediately see why this happens. If anyone knows what is going
on here, I would appreciate if they shared their wisdom. :)
Regards,
max