Skip to content

Conversation

@elibarzilay
Copy link
Contributor

@elibarzilay elibarzilay commented May 27, 2020

This completes the work that started in PR #33069, and fixes #32835.
(Includes that PR in a separate commit.)

There are probably two additional related changes that are needed to
make this more complete:

  • Fix the code that composes the error message (see the first two
    FIXMEs in callWithSpread3.ts).

  • Fix the code that checks the argument types (second two FIXMEs).

  • There is also an error in genericRestParameters1.ts which changed
    but should not be an error in the first place. Added a FIXME there
    too. (Probably will work if the previous iterm is done.)

In addition, getEffectiveCallArguments munges the arguments in case of
a spread in the last argument which might be better to avoid. (I think
that there are cases where it wouldn't work anyway, such as a spread of
an array followed by a spread of an empty array.)

@RyanCavanaugh
Copy link
Member

@typescript-bot test this
@typescript-bot user test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 27, 2020

Heya @RyanCavanaugh, I've started to run the extended test suite on this PR at 3d08da4. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 27, 2020

Heya @RyanCavanaugh, I've started to run the parallelized community code test suite on this PR at 3d08da4. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

This completes the work that started in PR microsoft#33069, and fixes microsoft#32835.

There are probably two additional related changes that are needed to
make this more complete:

* Fix the code that composes the error message (see the first two
  `FIXME`s in `callWithSpread3.ts`).

* Fix the code that checks the argument types (second two `FIXME`s).

* There is also an error in `genericRestParameters1.ts` which changed
  but should not be an error in the first place.  Added a `FIXME` there
  too.  (Probably will work if the previous iterm is done.)

In addition, `getEffectiveCallArguments` munges the arguments in case of
a spread in the last argument which might be better to avoid.  (I think
that there are cases where it wouldn't work anyway, such as a spread of
an array followed by a spread of an empty array.)
@elibarzilay
Copy link
Contributor Author

(After this is merged, there should be two new issues for the FIXMEs in the test, one for the bad error message on a bad arity, and one for checking the argument types.)

@sandersn
Copy link
Member

sandersn commented Jun 2, 2020

I just looked at the user test failures and there's nothing new there.

@elibarzilay elibarzilay merged commit 3151e2a into microsoft:master Jun 5, 2020
@elibarzilay elibarzilay deleted the 32835 branch June 5, 2020 03:47
@sandersn
Copy link
Member

sandersn commented Jun 9, 2020

Nothing in the RWC failures either.

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when use spread arguments twice

5 participants