Nathan Shively-Sanders 299745cb21
Fix crash in goto-def on @override (#51016)
* 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 4c1b03135576c9e5d146ce6f38e691c804cbb0dd.

* fix semicolon lint
2022-10-03 16:07:57 -07:00
..