robert-strandh / SICL

A fresh implementation of Common Lisp
Other
1.07k stars 79 forks source link

LET with lambda-list-keyword variables fails #132

Open Bike opened 5 years ago

Bike commented 5 years ago

As discussed in #clasp,

(cleavir-cst-to-ast:cst-to-ast (cst:cst-from-expression '(let ((&rest 42)) &rest)) nil nil) signals a malformed-lambda-list error. This is because convert-let essentially rewrites the form as ((lambda (&rest) &rest) 42), which is invalid.

As far as I'm aware, binding lexical variables with names in lambda-list-keywords is legal. Eclector does it, which is how this was noticed.