Skip to content

Commit 3bb813e

Browse files
committed
add test, remove additional whitespace
1 parent 7c8ebd9 commit 3bb813e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

compiler/src/dotty/tools/dotc/interactive/Completion.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ object Completion:
9494
* Inspect `path` to determine the completion prefix. Only symbols whose name start with the
9595
* returned prefix should be considered.
9696
*/
97-
def completionPrefix(path: List[untpd.Tree], pos: SourcePosition)(using Context): String =
97+
def completionPrefix(path: List[untpd.Tree], pos: SourcePosition)(using Context): String =
9898
path match
9999
case (sel: untpd.ImportSelector) :: _ =>
100100
completionPrefix(sel.imported :: Nil, pos)

presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionSuite.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,3 +1442,14 @@ class CompletionSuite extends BaseCompletionSuite:
14421442
|""".stripMargin
14431443
)
14441444

1445+
1446+
@Test def `no-square-brackets` =
1447+
checkEdit(
1448+
"""|object O:
1449+
| val a = List.appl@@
1450+
|""".stripMargin,
1451+
"""|object O:
1452+
| val a = List.apply($0)
1453+
|""".stripMargin,
1454+
)
1455+

0 commit comments

Comments
 (0)