@@ -537,7 +537,7 @@ object desugar {
537537 val nu = vparamss.foldLeft(makeNew(classTypeRef)) { (nu, vparams) =>
538538 val app = Apply (nu, vparams.map(refOfDef))
539539 vparams match {
540- case vparam :: _ if vparam.mods.is(Given ) => app.setUsingApply( )
540+ case vparam :: _ if vparam.mods.is(Given ) => app.setApplyKind( ApplyKind . Using )
541541 case _ => app
542542 }
543543 }
@@ -1188,18 +1188,19 @@ object desugar {
11881188 case Assign (Ident (name), rhs) => cpy.NamedArg (arg)(name, rhs)
11891189 case _ => arg
11901190 }
1191- def makeOp (fn : Tree , arg : Tree , selectPos : Span ) = {
1192- val args : List [Tree ] = arg match {
1193- case Parens (arg) => assignToNamedArg(arg) :: Nil
1194- case Tuple (args) if args.nonEmpty => // this case should be dropped if auto-tupling is removed
1195- args.mapConserve(assignToNamedArg)
1196- case _ => arg :: Nil
1197- }
1191+ def makeOp (fn : Tree , arg : Tree , selectPos : Span ) =
11981192 val sel = Select (fn, op.name).withSpan(selectPos)
11991193 if (left.sourcePos.endLine < op.sourcePos.startLine)
12001194 sel.pushAttachment(MultiLineInfix , ())
1201- InfixApply (sel, args)
1202- }
1195+ arg match
1196+ case Parens (arg) =>
1197+ Apply (sel, assignToNamedArg(arg) :: Nil )
1198+ case Tuple (Nil ) =>
1199+ Apply (sel, arg :: Nil ).setApplyKind(ApplyKind .InfixUnit )
1200+ case Tuple (args) if args.nonEmpty => // this case should be dropped if auto-tupling is removed
1201+ Apply (sel, args.mapConserve(assignToNamedArg))
1202+ case _ =>
1203+ Apply (sel, arg :: Nil )
12031204
12041205 if (isLeftAssoc(op.name))
12051206 makeOp(left, right, Span (left.span.start, op.span.end, op.span.start))
0 commit comments