File tree 1 file changed +3
-3
lines changed
compiler/src/scala/quoted/runtime/impl/printers
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ object SourceCode {
460
460
461
461
case tree @ Lambda (params, body) => // must come before `Block`
462
462
inParens {
463
- printArgsDefs(params)
463
+ printArgsDefs(params, isLambda = true )
464
464
this += (if tree.tpe.isContextFunctionType then " ?=> " else " => " )
465
465
printTree(body)
466
466
}
@@ -804,14 +804,14 @@ object SourceCode {
804
804
}
805
805
}
806
806
807
- private def printArgsDefs (args : List [ValDef ])(using elideThis : Option [Symbol ]): Unit = {
807
+ private def printArgsDefs (args : List [ValDef ], isLambda : Boolean = false )(using elideThis : Option [Symbol ]): Unit = {
808
808
val argFlags = args match {
809
809
case Nil => Flags .EmptyFlags
810
810
case arg :: _ => arg.symbol.flags
811
811
}
812
812
inParens {
813
813
if (argFlags.is(Flags .Implicit ) && ! argFlags.is(Flags .Given )) this += " implicit "
814
- if (argFlags.is(Flags .Given )) this += " using "
814
+ if (argFlags.is(Flags .Given ) && ! isLambda ) this += " using "
815
815
816
816
def printSeparated (list : List [ValDef ]): Unit = list match {
817
817
case Nil =>
You can’t perform that action at this time.
0 commit comments