Uh oh!
There was an error while loading. Please reload this page.
Fix Debug Fail Go-to-def on JS class - #58204
Closed
Armando Aguirre (armanio123) wants to merge 3 commits into
Closed
Fix Debug Fail Go-to-def on JS class#58204Armando Aguirre (armanio123) wants to merge 3 commits into
Armando Aguirre (armanio123) wants to merge 3 commits into
Conversation
Armando Aguirre (armanio123)
requested review from
Andrew Branch (andrewbranch) and Gabriela Araujo Britto (gabritto)April 15, 2024 20:47
| // and in either case the symbol has a construct signature definition, i.e. class | ||
| if (symbol.flags & SymbolFlags.Class && !(symbol.flags & (SymbolFlags.Function | SymbolFlags.Variable)) && (isNewExpressionTarget(node) || node.kind === SyntaxKind.ConstructorKeyword)) { | ||
| const cls = find(filteredDeclarations, isClassLike) || Debug.fail("Expected declaration to have at least one class-like declaration"); | ||
| const cls = find(filteredDeclarations, isClassLike) || getRightMostAssignedExpression(find(filteredDeclarations, isPropertyAccessExpression)?.parent as Expression) as ClassLikeDeclaration || Debug.fail("Expected declaration to have at least one class-like declaration"); |
ContributorAuthor
There was a problem hiding this comment.
Thanks for noticing. I'll close this as I think yours makes more sense.
Member
Nathan Shively-Sanders (@sandersn) do you have an opinion on whether we should accept this PR or #57628? |
This file contains hidden or 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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#57924 (comment)