Commit 1631365
Fix hover type for all definition contexts
Summary:
Handle FunctionDef, MethodDef, ClassDef, Parameter, TypeParameter,
ExceptionHandler, and PatternMatch contexts in get_type_at by
constructing a Key::Definition and looking up the type, instead of
returning None. This fixes hover on redefined functions (and other
cases where definition_at fails to find the definition).
Reviewed By: stroxler
Differential Revision: D95331714
fbshipit-source-id: 8ecfd7c52692434f346b6735c780bba292b3d8101 parent cdd00fd commit 1631365
2 files changed
+44
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
915 | | - | |
| 915 | + | |
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
920 | | - | |
921 | | - | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
922 | 926 | | |
923 | 927 | | |
924 | | - | |
| 928 | + | |
925 | 929 | | |
926 | 930 | | |
927 | | - | |
928 | | - | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
929 | 937 | | |
930 | 938 | | |
931 | | - | |
| 939 | + | |
932 | 940 | | |
933 | 941 | | |
934 | | - | |
935 | | - | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
936 | 948 | | |
937 | 949 | | |
938 | | - | |
| 950 | + | |
939 | 951 | | |
940 | 952 | | |
941 | | - | |
942 | | - | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
943 | 959 | | |
944 | 960 | | |
945 | | - | |
| 961 | + | |
946 | 962 | | |
947 | 963 | | |
948 | | - | |
949 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
950 | 970 | | |
951 | 971 | | |
952 | | - | |
| 972 | + | |
953 | 973 | | |
954 | 974 | | |
955 | | - | |
956 | | - | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
957 | 981 | | |
958 | 982 | | |
959 | 983 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | | - | |
| 91 | + | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | | - | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
0 commit comments