Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Trivial
-
Resolution: Declined
-
Affects Version/s: Release 1.3
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
In the implementation of the doc macro in core.repl, the line:
(if-let [special-name ('{& fn catch try finally try} name)]
contains:{& fn catch try finally try} which is a hashmap.
It should be a set, and the line should read:
(if-let special-name ('#{& fn catch try finally try} name)
To see the bug at work:
user> (doc &)
-------------------------
clojure.core/fn
(fn name? [params*] exprs*)
(fn name? ([params*] exprs*) +)
Special Form
params => positional-params* , or positional-params* & next-param
positional-param => binding-form
next-param => binding-form
name => symbol
Defines a function
Please see http://clojure.org/special_forms#fn
Activity
Andy Fingerhut
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Resolution | Declined [ 2 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
Stuart Halloway
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
Daniel, I'm pretty sure it is intended to be a map, not a set. The goal is to show the same documentation for try whether you ask for the documentation of try, catch, or finally. Also, to show the documentation for fn if you ask for the documentation of &, since that symbol is only useful in arg lists in fn (or let). They could have put multiple entries in special-doc-map and not had that little map inside doc, but that little map avoided the need for such duplication.