-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix modifier order for class member completions (#48066)
* fix modifier order & tests * remove empty replacement span from tests
- Loading branch information
Showing
14 changed files
with
95 additions
and
201 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @Filename: a.ts | ||
// @newline: LF | ||
// Case: modifier order | ||
////abstract class A { | ||
//// public get P(): string { | ||
//// return ""; | ||
//// } | ||
////} | ||
//// | ||
////abstract class B extends A { | ||
//// [|abstract|] /*a*/ | ||
////} | ||
//// | ||
////abstract class B1 extends A { | ||
//// [|abstract override|] /*b*/ | ||
////} | ||
|
||
verify.completions({ | ||
marker: "a", | ||
isNewIdentifierLocation: true, | ||
preferences: { | ||
includeCompletionsWithInsertText: true, | ||
includeCompletionsWithSnippetText: false, | ||
includeCompletionsWithClassMemberSnippets: true, | ||
}, | ||
includes: [ | ||
{ | ||
name: "P", | ||
sortText: completion.SortText.LocationPriority, | ||
replacementSpan: test.ranges()[0], | ||
insertText: "public abstract get P(): string;", | ||
}, | ||
], | ||
}); | ||
|
||
verify.completions({ | ||
marker: "b", | ||
isNewIdentifierLocation: true, | ||
preferences: { | ||
includeCompletionsWithInsertText: true, | ||
includeCompletionsWithSnippetText: false, | ||
includeCompletionsWithClassMemberSnippets: true, | ||
}, | ||
includes: [ | ||
{ | ||
name: "P", | ||
sortText: completion.SortText.LocationPriority, | ||
replacementSpan: test.ranges()[1], | ||
insertText: "public abstract override get P(): string;", | ||
}, | ||
], | ||
}); |
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
Oops, something went wrong.