Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make hasCorrectArity handle tuples properly #38795

Merged
merged 2 commits into from
Jun 5, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when use spread arguments twice
5 participants