#22: keyword parameters by same name as global variable ------------------------+--------------------------------------------------- Reporter: ehuelsmann | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: component1 | Version: Keywords: | ------------------------+--------------------------------------------------- Don Cohen writes that the code below is problematic. Especially because of the DEFVAR form.
==== /tmp/build1 (in-package :cl-user) (defpackage "AP5" (:use "CL") (:nicknames "ap5")) (in-package :ap5) (load "/tmp/compile.lsp" :print t) (setf source-default-path "/backup/shuttle/home/don/ap5-2006/foo.lsp" bin-default-path "/tmp/build-ap5/foo.fas") (ensure-directories-exist bin-default-path)
(COMPILE-AP5 :recompile t) ;;(compile-ap5 :ask t)
==== /tmp/compile.lsp (in-package "AP5")
(defvar info nil) (defvar ask nil) (defvar recompile nil) (defvar nevercompile nil) (defvar *changed* nil) (defvar startfile nil) (defvar stopfile t) (defvar *start-time* 0)
(defun compile-ap5 (&key recompile nevercompile info ask (break-at-end #+symbolics t) startfile (stopfile t) &aux *changed* (*start-time* (get-universal-time)) #+(or symbolics ti) (global:inhibit-fdefine- warnings t)) ; (compile-load "sys-depend") (declare (special generator-cost-record record-expensive-and-costs)) )
#22: keyword parameters by same name as global variable -------------------------+-------------------------------------------------- Reporter: ehuelsmann | Owner: somebody Type: defect | Status: closed Priority: major | Milestone: Component: component1 | Version: Resolution: fixed | Keywords: -------------------------+-------------------------------------------------- Changes (by mevenson):
* status: new => closed * resolution: => fixed
Comment:
Duplicate of ticket:15
#22: keyword parameters by same name as global variable -------------------------+-------------------------------------------------- Reporter: ehuelsmann | Owner: somebody Type: defect | Status: closed Priority: major | Milestone: Component: component1 | Version: Resolution: fixed | Keywords: -------------------------+--------------------------------------------------
Comment(by ehuelsmann):
As I can determine for now, this issue is caused by maybe-rewrite-lambda in precompile.lisp; see this input/output:
CL-USER(1): (defvar recompile nil) RECOMPILE CL-USER(2): (defun f (&key recompile)) F CL-USER(3): (f :recompile t) Debugger invoked on condition of type PROGRAM-ERROR: Unrecognized keyword argument :RECOMPILE Restarts: 0: TOP-LEVEL Return to top level. [1] CL-USER(4): 0 CL-USER(5): (describe #'f) #<FUNCTION F {146AD8B}> is an object of type FUNCTION. The function's lambda list is: (&KEY G33)
armedbear-ticket@common-lisp.net