Malformed let* statements get accepted when inside methods

Bug #1988880 reported by Patrick Poitras
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

Hello all,

Bit of a weird bug. In processing defmethod, some malformed let* statements are accepted as valid.

For example, let's say I have the following defun:

(defun print-1 ()
  (let* ((a 1 t))
    a))

The compilation of this function returns an error that states `The LET binding spec (A 1 T) is malformed.`

The same thing happens if I try to compile this lambda function.

(lambda ()
  (let* ((a 1 t))
    a))

However, if I have an arbitrary class,

(defclass arbitrary-object () ())

and try to define the following method

(defmethod print-1 ((obj arbitrary-object))
  (let* ((a 1 t))
    a))

Then the function compiles successfully. It is of note that the same method with a "let" instead of "let*" will fail to compile. This also happens with :method inside a defgeneric.

Thanks

SBCL 2.2.7

Linux ppoitras 4.15.0-192-generic #203-Ubuntu SMP Wed Aug 10 17:40:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

PS. Priority from my POV is low. We've encountered it once inside our codebase, but the result of macroexpansion just results in a truncated (a 1 t) to (a 1). We haven't seen it cause issues as of yet.

summary: - Malformed let statements get accepted when inside methods
+ Malformed let* statements get accepted when inside methods
Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.