ClojureScript

Varargs protococol impls can be defined but not called

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Pretty much the same issue I described here http://dev.clojure.org/jira/browse/CLJ-1024 but for ClojureScript rather than for Clojure. After the following declaration:

(extend-protocol IFn js/Array (-invoke ([& args] args)))

Calling ((array) 1 2 3) will return 1 rather than (1 2 3).

Activity

Hide
David Nolen added a comment -

That is not how you extend to array nor are rest args supported on protocol implementations. I'm inclined to decline this ticket if I don't have more information.

Show
David Nolen added a comment - That is not how you extend to array nor are rest args supported on protocol implementations. I'm inclined to decline this ticket if I don't have more information.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: