This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [GSoC] Parameter protocols in CL


On 23 July 2012 23:22, Charles Turner <chturne@gmail.com> wrote:
> The extended keyword list is now implemented

Actually, it has a bug I'm not sure about:

#|kawa:14|# (defun test (&key ((:environment env-arg-name) 10)) (list
env-arg-name))
(Lambda/36/fl:0
  (#!key
   (ENVIRONMENT:/37/fl:40040(ignorable) (Quote
                                          #!undefined ::java.lang.Object)))
  (Let#37
    (({COMMON-LISP}:ENV-ARG-NAME/36/fl:40040(ignorable) =
      (If (Apply (Quote #<procedure eq?>)
            (Ref/69/ENVIRONMENT:/Declaration[ENVIRONMENT:/37])
            (Quote #!undefined)) ;; line 16 below surely should make
this conditional false?
        (Quote 10)
        (Ref/70/ENVIRONMENT:/Declaration[ENVIRONMENT:/37])))) ;; ...
and return this
    (Apply line:14:53 (Ref/74/Declaration[applyToArgs/2])
      (Ref/72/list)
      (Ref/73/{COMMON-LISP}:ENV-ARG-NAME/Declaration[{COMMON-LISP}:ENV-ARG-NAME/36]))))]
#|kawa:15|# (test)
(10)
#|kawa:16|# (test :environment 12)
(10)

Can anyone see what's wrong with that syntax? Am I misunderstanding
how the keyword arguments are bound?

Thanks,
Charles.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]