File tree 2 files changed +5
-2
lines changed
compiler/src/dotty/tools/dotc
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2816,9 +2816,11 @@ object Parsers {
2816
2816
setLastStatOffset()
2817
2817
if (in.token == IMPORT )
2818
2818
stats ++= importClause()
2819
+ else if (in.token == GIVEN )
2820
+ stats += implicitClosure(in.offset, Location .InBlock , modifiers(closureMods))
2819
2821
else if (isExprIntro)
2820
2822
stats += expr(Location .InBlock )
2821
- else if (isDefIntro(localModifierTokens) || in.token == GIVEN ) // !!!!
2823
+ else if (isDefIntro(localModifierTokens))
2822
2824
if (in.token == IMPLICIT || in.token == ERASED || in.token == GIVEN ) {
2823
2825
val start = in.offset
2824
2826
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) {
141
141
argStr ~ " => " ~ argText(args.last)
142
142
}
143
143
144
- def toTextDependentFunction (appType : MethodType ): Text = // !!!!
144
+ def toTextDependentFunction (appType : MethodType ): Text =
145
+ (keywordText(" erased " ) provided appType.isErasedMethod) ~
145
146
(keywordText(" given " ) provided appType.isImplicitMethod) ~
146
147
" (" ~ paramsText(appType) ~ " ) => " ~ toText(appType.resultType)
147
148
You can’t perform that action at this time.
0 commit comments