Skip to content

Change type guards error message. #6596

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

Closed
wants to merge 2 commits into from
Closed

Change type guards error message. #6596

wants to merge 2 commits into from

Conversation

YuichiNukiyama
Copy link
Contributor

Change type guards error message. And add test.
This pull request relate to Error message for type guards are vague about rules #6540 issue.

Change type guards  error message. And add test.
@msftclas
Copy link

Hi @YuichiNukiyama, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@DanielRosenwasser
Copy link
Member

Hi @YuichiNukiyama,. rather than modifying the current error message, you should be add a new diagnostic message entirely. What you've done here completely changes all error messages for assignability.

First, you should restore the message to its original contents. Then, when checking the assignability of the guarded type, you should pass that diagnostic message to as the head message to checkTypeAssignableTo.

You'll also need to actually run the tests and accept our baselines. See details in our CONTRIBUTING.md file.

@YuichiNukiyama YuichiNukiyama deleted the fix6540 branch February 13, 2016 01:47
@YuichiNukiyama YuichiNukiyama restored the fix6540 branch February 13, 2016 02:01
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants