Duplicate function names in FLET are accepted silently.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Unassigned |
Bug Description
What I do:
(flet ((foo () 1)
(foo () 2))
(foo))
=> 2
What happens:
No ERROR or WARNING of any kind is signaled.
What I expected to happen:
I expected to get at least a STYLE-WARNING.
Analysis:
I could not find anything in the CLHS regarding duplicate function names in a FLET, but here's a very similar form:
(let ((foo 1)
(foo 2))
foo)
error --> The variable FOO occurs more than once in the LET.
Given that LET and FLET work in exactly analogous ways as it relates to (parallel) binding of names (except they simply do so in different namespaces), I think duplicate binding names in FLET should be treated the same as duplicate binding names in LET.
SBCL version: 1.0.51
uname -a: Linux dynamorph 2.6.32-33-generic #72-Ubuntu SMP Fri Jul 29 21:08:37 UTC 2011 i686 GNU/Linux
*features*:
(:SWANK :QUICKLISP :SB-BSD-
:COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE
:SB-EVAL :SB-SOURCE-
:SB-THREAD :LARGEFILE :GENCGC :STACK-
:C-STACK-
:RAW-INSTANCE-
:STACK-
:CYCLE-COUNTER :INLINE-CONSTANTS :MEMORY-
:LINKAGE-TABLE :OS-PROVIDES-DLOPEN :OS-PROVIDES-DLADDR :OS-PROVIDES-PUTWC
:OS-PROVIDES-
Changed in sbcl: | |
importance: | Undecided → Wishlist |
importance: | Wishlist → Low |
status: | New → Triaged |
Fixed thusly- https:/ /sourceforge. net/p/sbcl/ sbcl/ci/ bf0038ec