-
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] Specialized implementation for identifier type synthesis in cl…
…ass extends Summary: The extends clause in class, although being an expression, is more annotation-like. We made this decision during LTI development so that we can tolerate more cyclic class definitions in the most common cases. In the LTI 2.0 system, all the annotations will be resolved lazily all at once at the end of component resolution. Early forcing is not allowed, otherwise it will result in internal error. Currently, class extends' identifier are evaluated eagarly due to repositioning. We can achieve the same using AnnotT, and avoid the eagar repositioning. Using AnnotT to achieve repositioning effect is already used extensively in type_annotation and type_sig_merge when we are refering to a type identifier. Changelog: [internal] Reviewed By: panagosg7 Differential Revision: D55296799 fbshipit-source-id: d9d035750e81d58eca4befdf1f947719779187f0
- Loading branch information
1 parent
4e16d4f
commit 3e01314
Showing
8 changed files
with
34 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// @flow | ||
|
||
class Foo {} | ||
|
||
class Bar extends F | ||
// ^ |
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