File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/src/scala/quoted/runtime/impl/printers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ object SourceCode {
460460
461461 case tree @ Lambda (params, body) => // must come before `Block`
462462 inParens {
463- printArgsDefs(params)
463+ printArgsDefs(params, isLambda = true )
464464 this += (if tree.tpe.isContextFunctionType then " ?=> " else " => " )
465465 printTree(body)
466466 }
@@ -804,14 +804,14 @@ object SourceCode {
804804 }
805805 }
806806
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 = {
808808 val argFlags = args match {
809809 case Nil => Flags .EmptyFlags
810810 case arg :: _ => arg.symbol.flags
811811 }
812812 inParens {
813813 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 "
815815
816816 def printSeparated (list : List [ValDef ]): Unit = list match {
817817 case Nil =>
You can’t perform that action at this time.
0 commit comments