@@ -537,7 +537,7 @@ object desugar {
537
537
val nu = vparamss.foldLeft(makeNew(classTypeRef)) { (nu, vparams) =>
538
538
val app = Apply (nu, vparams.map(refOfDef))
539
539
vparams match {
540
- case vparam :: _ if vparam.mods.is(Given ) => app.setUsingApply( )
540
+ case vparam :: _ if vparam.mods.is(Given ) => app.setApplyKind( ApplyKind . Using )
541
541
case _ => app
542
542
}
543
543
}
@@ -1188,18 +1188,19 @@ object desugar {
1188
1188
case Assign (Ident (name), rhs) => cpy.NamedArg (arg)(name, rhs)
1189
1189
case _ => arg
1190
1190
}
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 ) =
1198
1192
val sel = Select (fn, op.name).withSpan(selectPos)
1199
1193
if (left.sourcePos.endLine < op.sourcePos.startLine)
1200
1194
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 )
1203
1204
1204
1205
if (isLeftAssoc(op.name))
1205
1206
makeOp(left, right, Span (left.span.start, op.span.end, op.span.start))
0 commit comments