Skip to content

Commit c072f7d

Browse files
committed
bugfix: Fix nn missing in Completions
1 parent e298f9d commit c072f7d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Completions(
7676
if appl.fun == funSel && sel == fun => false
7777
case _ => true) &&
7878
(adjustedPath match
79-
/* In case of `class X derives TC@@` we shouldn't add `[]`
79+
/* In case of `class X derives TC@@` we shouldn't add `[]`
8080
*/
8181
case Ident(_) :: (templ: untpd.DerivingTemplate) :: _ =>
8282
val pos = completionPos.toSourcePosition
@@ -213,11 +213,11 @@ class Completions(
213213
case (ident: Ident) :: (app@Apply(_, List(arg))) :: _ =>
214214
app.symbol.info match
215215
case mt@MethodType(termNames) if app.symbol.paramSymss.last.exists(_.is(Given)) &&
216-
!text.substring(app.fun.span.start, arg.span.end).contains("using") =>
216+
!text.substring(app.fun.span.start, arg.span.end).nn.contains("using") =>
217217
suffix.withNewPrefix(Affix(PrefixKind.Using))
218-
case _ => suffix
218+
case _ => suffix
219219
case _ => suffix
220-
220+
221221
}
222222
.chain { suffix => // for () suffix
223223
if shouldAddSuffix && symbol.is(Flags.Method) then

0 commit comments

Comments
 (0)