New rest parameter properties error message#9298
Conversation
|
Hi @OrangeShark, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
|
I noticed the extra, bogus baselines too. Just take them out of the PR for now while we figure out how they got there. |
f1debcb to
6a4400a
Compare
|
@sandersn Okay, I took them out and updated the pull request. |
| ~~~~~~~~~~~~~~~ | ||
| !!! error TS2370: A rest parameter must be of an array type. | ||
| function a3(...b?) { } // Error, can't be optional | ||
| ~ |
There was a problem hiding this comment.
why wasn't this an error before? weird.
There was a problem hiding this comment.
I checked the git history and they never had an error when they were added. Seems it has something to do with the other bogus baselines. They have always outputted the correct error in the compiler.
|
Looks good except for a minor comment change in the baseline. |
|
I changed the comment. I also believe the reason for the previously missing error message for For example compiling this function a3(...b?) {}
class C {
constructor(public ...temp) {}
}only prints |
|
👍 |
|
@RyanCavanaugh or @DanielRosenwasser can you take a look at the wording of the new error messages? I want to get another pair of eyes besides mine. |
|
This change makes me happy 💯. We're just waiting on the Travis Build before we merge right now. |
|
Thanks again, @OrangeShark. |
Fixes #8827
Some baselines unrelated to the changes I made have been modified or even deleted. For example
Report an error when compiler-options input is empty object.errors.txtwas deleted but I can't seem to locate the test even in master.