jcbeaudoin / MKCL

ManKai Common Lisp
Other
33 stars 8 forks source link

Duplicate keyword argument handling in the built-in functions #35

Closed davidmullen closed 6 months ago

davidmullen commented 6 months ago

The error message here is a bit confusing:

> (write-to-string 10 :base 2 :base 10)

Debugger called in: #<thread "Initial" active (15385) 0x7f71a5921740 7f71a2ed6000>.

#<a SI:SIMPLE-PROGRAM-ERROR 140125765667168>:
    In LAMBDA-LIST &KEY part of WRITE: expected one of (:RIGHT-MARGIN :READABLY :RADIX :PRETTY :PPRINT-DISPATCH :MISER-WIDTH :LINES :LEVEL :LENGTH :GENSYM :ESCAPE :CIRCLE :CASE :BASE :ARRAY :STREAM), instead got :BASE.

Section 3.4.1.4 says if there are duplicate keyword arguments then the leftmost wins.

jcbeaudoin commented 6 months ago

Could you please try commit 3da53bf on master/HEAD. It should fix this issue.

davidmullen commented 6 months ago

Yep, this passes all of my tests.