File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/main/dotty/tools/pc/completions
test/dotty/tools/pc/tests/completion Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -202,9 +202,10 @@ class Completions(
202202 }
203203 .chain{ suffix =>
204204 adjustedPath match
205- case (ident : Ident ) :: (app@ Apply (_,args)) :: _ if args.size == 1 =>
205+ case (ident : Ident ) :: (app@ Apply (_, List (arg))) :: _ =>
206206 app.symbol.info match
207- case mt@ MethodType (termNames) if app.symbol.paramSymss.last.exists(_.is(Given )) =>
207+ case mt@ MethodType (termNames) if app.symbol.paramSymss.last.exists(_.is(Given )) &&
208+ ! text.substring(app.fun.span.start, arg.span.end).contains(" using" ) =>
208209 suffix.withNewPrefix(Affix (PrefixKind .Using ))
209210 case _ => suffix
210211 case _ => suffix
Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ class CompletionArgSuite extends BaseCompletionSuite:
278278 |@main def main1(): Unit =
279279 | val str = "hello"
280280 | val int = 4
281- | hello(using str, int)
281+ | hello(str, int)
282282 | """ .stripMargin,
283283 assertSingleItem = false )
284284
You can’t perform that action at this time.
0 commit comments