Error while parsing arguments to DESTRUCTURING-BIND during compile
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
(lambda (b)
(declare (notinline + find <=))
(loop for lv2 below 2
count (and (<= 0 0 0) (find (+ b) #(-32757854765) :test '<=))))
==>
Error while parsing arguments to DESTRUCTURING-BIND:
too many elements in
(#<SB-C::LVAR 1 {10360CD3E3}> #<SB-C::LVAR 2 {10360CD533}>
#<SB-C::LVAR 3 {10360CD623}>)
to satisfy lambda list
(A2 B2):
exactly 2 expected, but got 3
[Condition of type SB-KERNEL:
[...]
Backtrace:
0: (SB-C::
1: ((FLET SB-C::TRY :IN SB-C::RANGE-
2: ((LABELS SB-C::TRY :IN SB-C::RANGE-
3: (SB-C::
4: (SB-C::IR1-OPTIMIZE #<SB-C:COMPONENT :NAME "<unknown>" {10360D0593}> NIL)
5: (SB-C::
6: (SB-C::
7: (SB-C::IR1-PHASES #<SB-C:COMPONENT :NAME "<unknown>" {10360D0593}>)
8: (SB-C::
[...]
x86-64, "2.3.0.
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
(locally (declare (notinline > lcm +)) (lcm (+ 0) (loop for x below 2 count (> 0)))) also gives a similar error, this time with just 1 instead of 2. It looks like destructuring bind is assuming the comparison operators have exactly two args, and notinline is messing this up.