Clojure

implementation of doc macro in core.repl incorrect for special names... add one character to fix

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Trivial 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

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: