-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Before this change, we only printed the top-most error on Try Flow. Increasingly, we are using the "extra" field of an error to provide essential context for an error. For example, given the code: ``` type A = { p: { q: string } }; type B = { +p: { +q: number } }; declare var a: A; (a: B); ``` Try flow would only print: ``` 4: (a: B); ^ object type. This type is incompatible with 4: (a: B); ^ object type ``` After this change, we see the full error: ``` 4: (a: B); ^ object type. This type is incompatible with 4: (a: B); ^ object type Property `p` is incompatible: 1: type A = { p: { q: string } }; ^ object type. This type is incompatible with 2: type B = { +p: { +q: number } }; ^ object type Property `q` is incompatible: 1: type A = { p: { q: string } }; ^ string. This type is incompatible with 2: type B = { +p: { +q: number } }; ^ number ``` Reviewed By: mroch Differential Revision: D5860352 fbshipit-source-id: bddce1a8eca450a5bb6e0eeaeba3e3659034b28f
- Loading branch information
1 parent
b47d62b
commit b6d12e4
Showing
2 changed files
with
88 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters