@@ -26,23 +26,21 @@ class CodeTester(sources: List[SourceWithPositions], actions: List[Action]) {
2626 *
2727 * @param range The range over which to hover.
2828 * @param expected The expected result.
29- * @return This `CodeTester` after performing the action.
3029 *
3130 * @see dotty.tools.languageserver.util.actions.CodeHover
3231 */
33- def hover (range : CodeRange , expected : String ): CodeTester =
32+ def hover (range : CodeRange , expected : String ): this . type =
3433 doAction(new CodeHover (range, expected))
3534
3635 /**
3736 * Perform a jump to definition over `range`, verifies that the results are `expected`.
3837 *
3938 * @param range The range of positions from which run `jump to definition`.
4039 * @param expected The expected positions to jump to.
41- * @return This `CodeTester` after performing the action.
4240 *
4341 * @see dotty.tools.languageserver.util.actions.CodeDefinition
4442 */
45- def definition (range : CodeRange , expected : Seq [CodeRange ]): CodeTester =
43+ def definition (range : CodeRange , expected : Seq [CodeRange ]): this . type =
4644 doAction(new CodeDefinition (range, expected))
4745
4846 /**
@@ -51,11 +49,10 @@ class CodeTester(sources: List[SourceWithPositions], actions: List[Action]) {
5149 *
5250 * @param range The range of positions to highlight.
5351 * @param expected The expected ranges and the kind of symbols that should be highlighted.
54- * @return This `CodeTester` after performing the action.
5552 *
5653 * @see dotty.tools.languageserver.util.actions.CodeDefinition
5754 */
58- def highlight (range : CodeRange , expected : (CodeRange , DocumentHighlightKind )* ): CodeTester =
55+ def highlight (range : CodeRange , expected : (CodeRange , DocumentHighlightKind )* ): this . type =
5956 doAction(new CodeDocumentHighlight (range, expected))
6057
6158 /**
@@ -64,11 +61,10 @@ class CodeTester(sources: List[SourceWithPositions], actions: List[Action]) {
6461 * @param range The range of positions from which search for references.
6562 * @param expected The expected positions of the references
6663 * @param withDecl When set, include the declaration of the symbol under `range` in the results.
67- * @return This `CodeTester` after performing the action.
6864 *
6965 * @see dotty.tools.languageserver.util.actions.CodeReferences
7066 */
71- def references (range : CodeRange , expected : List [CodeRange ], withDecl : Boolean = false ): CodeTester =
67+ def references (range : CodeRange , expected : List [CodeRange ], withDecl : Boolean = false ): this . type =
7268 doAction(new CodeReferences (range, expected, withDecl))
7369
7470 /**
@@ -77,11 +73,10 @@ class CodeTester(sources: List[SourceWithPositions], actions: List[Action]) {
7773 *
7874 * @param marker The position from which to ask for completions.
7975 * @param expected The expected completion results.
80- * @return This `CodeTester` after performing the action.
8176 *
8277 * @see dotty.tools.languageserver.util.actions.CodeCompletion
8378 */
84- def completion (marker : CodeMarker , expected : Set [(String , CompletionItemKind , String )]): CodeTester =
79+ def completion (marker : CodeMarker , expected : Set [(String , CompletionItemKind , String )]): this . type =
8580 doAction(new CodeCompletion (marker, expected))
8681
8782 /**
@@ -91,11 +86,10 @@ class CodeTester(sources: List[SourceWithPositions], actions: List[Action]) {
9186 * @param marker The position from which to ask for renaming.
9287 * @param newName The new name to give to the symbol.
9388 * @param expected The expected positions to change.
94- * @return This `CodeTester` after performing the action.
9589 *
9690 * @see dotty.tools.languageserver.util.actions.CodeRename
9791 */
98- def rename (marker : CodeMarker , newName : String , expected : Set [CodeRange ]): CodeTester =
92+ def rename (marker : CodeMarker , newName : String , expected : Set [CodeRange ]): this . type =
9993 doAction(new CodeRename (marker, newName, expected)) // TODO apply changes to the sources and positions
10094
10195 /**
@@ -104,11 +98,10 @@ class CodeTester(sources: List[SourceWithPositions], actions: List[Action]) {
10498 *
10599 * @param marker The marker defining the source file from which to query.
106100 * @param expected The expected symbols to be found.
107- * @return This `CodeTester` after performing the action.
108101 *
109102 * @see dotty.tools.languageserver.util.actions.CodeDocumentSymbol
110103 */
111- def documentSymbol (marker : CodeMarker , expected : SymInfo * ): CodeTester =
104+ def documentSymbol (marker : CodeMarker , expected : SymInfo * ): this . type =
112105 doAction(new CodeDocumentSymbol (marker, expected))
113106
114107 /**
@@ -117,11 +110,10 @@ class CodeTester(sources: List[SourceWithPositions], actions: List[Action]) {
117110 *
118111 * @param query The query used to find symbols.
119112 * @param expected The expected symbols to be found.
120- * @return This `CodeTester` after performing the action.
121113 *
122114 * @see dotty.tools.languageserver.util.actions.CodeSymbol
123115 */
124- def symbol (query : String , symbols : SymInfo * ): CodeTester =
116+ def symbol (query : String , symbols : SymInfo * ): this . type =
125117 doAction(new CodeSymbol (query, symbols))
126118
127119 private def doAction (action : Action ): this .type = {
0 commit comments