ClojureScript

Collection invoke errors report arity off by 1

Details

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

Description

Runtime collection invokes will report arity that is off by one. This is because we use the generic function arity dispatching logic which doesn't account for the 1st self argument.

Activity

Hide
Mike Jackson added a comment -

Hey David,

Can I pick this one up? I'm a first time contributor and I wouldn't mind using this to get a lay of the land. I've already signed the Contributor Agreement.

Cheers

Show
Mike Jackson added a comment - Hey David, Can I pick this one up? I'm a first time contributor and I wouldn't mind using this to get a lay of the land. I've already signed the Contributor Agreement. Cheers
Hide
David Nolen added a comment -

Mike, I've updated your permissions. Please assign the ticket to yourself. Thanks!

Show
David Nolen added a comment - Mike, I've updated your permissions. Please assign the ticket to yourself. Thanks!
Hide
Mike Jackson added a comment -

Awesome, thanks. Looking forward to it.

Show
Mike Jackson added a comment - Awesome, thanks. Looking forward to it.
Hide
André Luís Anastácio added a comment -

This issue are assigned to Mike a long time ago, maybe I can solve this.

David, sorry for the newbie question but I don't understand the issue. Do you have some example?

Show
André Luís Anastácio added a comment - This issue are assigned to Mike a long time ago, maybe I can solve this. David, sorry for the newbie question but I don't understand the issue. Do you have some example?
Hide
António Nuno Monteiro added a comment -

Here go a couple of examples:

cljs.user=> ({:a 1})
Error: Invalid arity: 1

cljs.user=> ({:a 1} :a :not-found :other)
Error: Invalid arity: 4

Notice how the arity is off by one? In the first example, we passed 0 args and in the 2nd example we passed 3 args.

Show
António Nuno Monteiro added a comment - Here go a couple of examples:
cljs.user=> ({:a 1})
Error: Invalid arity: 1

cljs.user=> ({:a 1} :a :not-found :other)
Error: Invalid arity: 4
Notice how the arity is off by one? In the first example, we passed 0 args and in the 2nd example we passed 3 args.

People

Vote (0)
Watch (6)

Dates

  • Created:
    Updated:
    Resolved: