File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2816,9 +2816,11 @@ object Parsers {
28162816 setLastStatOffset()
28172817 if (in.token == IMPORT )
28182818 stats ++= importClause()
2819+ else if (in.token == GIVEN )
2820+ stats += implicitClosure(in.offset, Location .InBlock , modifiers(closureMods))
28192821 else if (isExprIntro)
28202822 stats += expr(Location .InBlock )
2821- else if (isDefIntro(localModifierTokens) || in.token == GIVEN ) // !!!!
2823+ else if (isDefIntro(localModifierTokens))
28222824 if (in.token == IMPLICIT || in.token == ERASED || in.token == GIVEN ) {
28232825 val start = in.offset
28242826 var imods = modifiers(closureMods)
Original file line number Diff line number Diff line change @@ -141,7 +141,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
141141 argStr ~ " => " ~ argText(args.last)
142142 }
143143
144- def toTextDependentFunction (appType : MethodType ): Text = // !!!!
144+ def toTextDependentFunction (appType : MethodType ): Text =
145+ (keywordText(" erased " ) provided appType.isErasedMethod) ~
145146 (keywordText(" given " ) provided appType.isImplicitMethod) ~
146147 " (" ~ paramsText(appType) ~ " ) => " ~ toText(appType.resultType)
147148
You can’t perform that action at this time.
0 commit comments