Commit 299745c
authored
Fix crash in goto-def on
* Fix crash in goto-def on `@override`
When the base type is not defined, getDefinitionFromOverriddenMember
will have its type as errorType, which has no symbol. The error handling
previously only handled the case of no baseType at all -- which I'm not
sure ever actually happens.
* Improve checking
1. getTypeAtLocation never returns undefined, only errorType, so check for that.
2. Return directly after missing baseTypeNode instead of continuing to return later.
* Experiment with making goto-def on `override` more consistent
* Unify static/instance node->symbol->type path
* Make getSymbolAtLocation support class expressions
and parenthesized expressions
* Revert "Make getSymbolAtLocation support class expressions"
This reverts commit 4c1b031.
* fix semicolon lint@override (#51016)1 parent 7dcf11f commit 299745c
File tree
2 files changed
+22
-4
lines changed- src/services
- tests/cases/fourslash
2 files changed
+22
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
179 | | - | |
180 | | - | |
| 181 | + | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments