ClojureScript

IFn implementors have a broken call implementation, all args after 20th argument should be collected into a seq

Details

  • Type: Task Task
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.7.145
  • Fix Version/s: 1.9.671
  • Component/s: None
  • Labels:
    None

Description

Regular fns (which are just JavaScript fns) have no such limit. For IFn implementors we should not allow arities above 21 args, and we should transform the 21st arity into a var args signature.

Activity

Hide
Fran├žois De Serres added a comment -

we should transform the 21st arity into a var args signature

Unless misunderstanding, can't do that. Var args sigs aren't allowed in protocols.

we should not allow arities above 21 args

Emitting an analyzer warning is what you want?

Show
Fran├žois De Serres added a comment -
we should transform the 21st arity into a var args signature
Unless misunderstanding, can't do that. Var args sigs aren't allowed in protocols.
we should not allow arities above 21 args
Emitting an analyzer warning is what you want?
Hide
Antonin Hildebrand added a comment -

I believe I hit this problem in my code using core.async[1].

If it is not possible to implement ATM, I would kindly ask for a compiler warning at least. This thing manifested as a infinite recursive loop ending up in a cryptic stack overflow.

[1] https://github.com/binaryage/dirac/commit/cce56470975a287c0164e6f79cd525d6ed27a543

Show
Antonin Hildebrand added a comment - I believe I hit this problem in my code using core.async[1]. If it is not possible to implement ATM, I would kindly ask for a compiler warning at least. This thing manifested as a infinite recursive loop ending up in a cryptic stack overflow. [1] https://github.com/binaryage/dirac/commit/cce56470975a287c0164e6f79cd525d6ed27a543

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: