-
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.
[flow] Specialize TypeAppT at the declaration site
Summary: Similar to `EvalT`, let's force it at the declaration site. Similar to the challenges to `EvalT`, forcing it everywhere causes too many errors, which points to some gaps in the language design. This diff alone will not fix the issue of misplaced error, but at least the error will now consistently appear at the declaration site no matter whether it's used, so users can see it in the IDE without being overridden. It's also a step towards getting rid of all misplaced errors. In a future when we can eagerly validate all these things that tend to cause misplaced errors, we can just filter out these errors in the future. Changelog: [errors] Flow will now error on invalid type applications at the declaration site, if the type application does not use another generic type from an outer scope. [example](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+IFkolXpUCWewUEAwhCQgRDH8wEH4hMnwROHlsNnw4KHwwSLAAC3wANyo4LFxscWQuHgMNZmwsiRSAWglaY1cq-hIAa2wJXNpG4Vxcdvdu3v7B0RxKUYMhKDBSqmbWwIq3eagoOrKSKgH0wtMMPznY7d2SfcoBiEZ-aG5G3Ix085AF-ZhsRoRehqUEiNMgSQHlSruBZxJrMcJwMhzAC+-EgGiCLWMAAIACpYgC8WPspigCAA3AAdPxrLEAQQJuIAPMT0ggAHxkrEAei5WJMlAglCxUAgAHcYiB8iYSHBoEEIvYTCAkUA) Reviewed By: panagosg7 Differential Revision: D55456495 fbshipit-source-id: 03527deab4a2054d4659c1e8481a9df3f921ed64
- Loading branch information
1 parent
4c4a9a9
commit 514f690
Showing
5 changed files
with
90 additions
and
7 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
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
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