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 {
415415 vdef.withMods(mods | Param )
416416 }
417417
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 =
419419 ValDef (nme.syntheticParamName(n), if (tpt == null ) TypeTree () else tpt, EmptyTree )
420- .withFlags(flags | SyntheticTermParam )
420+ .withFlags(flags)
421421
422422 def lambdaAbstract (tparams : List [TypeDef ], tpt : Tree )(implicit ctx : Context ): Tree =
423423 if (tparams.isEmpty) tpt else LambdaTypeTree (tparams, tpt)
Original file line number Diff line number Diff line change @@ -2247,7 +2247,8 @@ object Parsers {
22472247 val tps = commaSeparated(() => annotType())
22482248 var counter = nparams
22492249 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 ))
22512252 params :: recur(firstClause = false , nparams + params.length)
22522253 }
22532254 else Nil
You can’t perform that action at this time.
0 commit comments