File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -415,9 +415,9 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
415
415
vdef.withMods(mods | Param )
416
416
}
417
417
418
- def makeSyntheticParameter (n : Int = 1 , tpt : Tree = null , flags : FlagSet = EmptyFlags )(implicit ctx : Context ): ValDef =
418
+ def makeSyntheticParameter (n : Int = 1 , tpt : Tree = null , flags : FlagSet = SyntheticTermParam )(implicit ctx : Context ): ValDef =
419
419
ValDef (nme.syntheticParamName(n), if (tpt == null ) TypeTree () else tpt, EmptyTree )
420
- .withFlags(flags | SyntheticTermParam )
420
+ .withFlags(flags)
421
421
422
422
def lambdaAbstract (tparams : List [TypeDef ], tpt : Tree )(implicit ctx : Context ): Tree =
423
423
if (tparams.isEmpty) tpt else LambdaTypeTree (tparams, tpt)
Original file line number Diff line number Diff line change @@ -2247,7 +2247,8 @@ object Parsers {
2247
2247
val tps = commaSeparated(() => annotType())
2248
2248
var counter = nparams
2249
2249
def nextIdx = { counter += 1 ; counter }
2250
- val params = tps.map(makeSyntheticParameter(nextIdx, _, Given | Implicit ))
2250
+ val paramFlags = if (ofClass) Private | Local | ParamAccessor else Param
2251
+ val params = tps.map(makeSyntheticParameter(nextIdx, _, paramFlags | Synthetic | Given | Implicit ))
2251
2252
params :: recur(firstClause = false , nparams + params.length)
2252
2253
}
2253
2254
else Nil
You can’t perform that action at this time.
0 commit comments