You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor func_params.ml to give rest params their own field
Summary:
This is the first in a series of changes around how rest parameters
are handled. Up to now, we've been handling rest parameters using the `RestT`
type. A rest parameter is just a `RestT` type in a list of parameters. It
probably should be the last element in the list, but that's not really
enforced.
However the rest parameter shouldn't really be represented by a type. You can't
pass around a rest parameter. Nothing will ever resolve to a rest parameter. A
rest parameter is always immediately obvious syntactially. It's a bit of a hack
to use a type to represent it. Instead, it should be held separately from the
other params.
This diff splits the rest param from the other params in func_params.ml
Reviewed By: mroch
Differential Revision: D4372165
fbshipit-source-id: f3f42e2ace7f820b86af2b68e76d1bf7db5fe6f5
0 commit comments