-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
capture overriding when no override annotations
Summary: This solves T181646571 `hack.MethodOverride` only captured method annotated with Override. ``` predicate MethodOverrides : { derived : MethodDeclaration, base : MethodDeclaration, annotation : maybe bool, // to distinguish override <<__Override>> annotation } ``` ## How it works Define a method to compute origin of an overridden method ``` Decl_provider.get_overridden_method ctx ~class_name ~method_name ~is_static |> Decl_entry.to_option >>= fun method_ -> Some method_.Typing_defs.ce_origin ``` and we move the logic from `index_xrefs.ml` (which indexes xrefs, and identified the override from the attribute xref), to `index_decl.ml`which indexes all methods). Reviewed By: pepeiborra Differential Revision: D57452291 fbshipit-source-id: 812d061f52501de21a5f6952c7cc60ae9cb6f612
- Loading branch information
1 parent
13c9e6f
commit 417d359
Showing
9 changed files
with
80 additions
and
49 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
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