robert-strandh / SICL

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

Missing acclimation:report-condition for cleavir-cst-to-ast:malformed-lambda-list #138

Closed kpoeck closed 5 years ago

kpoeck commented 5 years ago

Can only show this in clasp cst build:

(LET ((&ALLOW-OTHER-KEYS 17))
  &ALLOW-OTHER-KEYS)
; caught ERROR:
;   
;   
;   Condition of type: NO-APPLICABLE-METHOD-ERROR
;   No applicable method for REPORT-CONDITION with arguments
;    (#<CLEAVIR-CST-TO-AST:MALFORMED-LAMBDA-LIST> #<PRETTY-STREAM  @0x11e02d8d9> #<ACCLIMATION:ENGLISH>)

Fixed the NO-APPLICABLE-METHOD-ERROR by adding the following to condition-reporters-english.lisp in CST-to-AST

(defmethod acclimation:report-condition ((condition malformed-lambda-list) stream (language acclimation:english))
  (let ((form (cst:raw (cst condition))))
    (format stream "The lambda list ~s is malformed."
          (cst:raw (cst condition)))))

Whether this is really a malformed lambda-list seems to be another topic already covered in #132

Bike commented 5 years ago

(lambda (&allow-other-keys) &allow-other-keys) results in the same issue regardless of #132.

I think your error message is fine, so I can either put that in myself or you can file a pull request.