@@ -444,13 +444,13 @@ object Trees {
444
444
private [ast] def rawMods : Modifiers [T ] =
445
445
if (myMods == null ) genericEmptyModifiers else myMods
446
446
447
- def withMods (mods : Modifiers [T @ uncheckedVariance ]): ThisTree [T ] = { // TODO move to untpd.modsDeco?
448
- val tree = if (myMods == null || (myMods == mods)) this else clone.asInstanceOf [MemberDef [T ]]
447
+ def withMods (mods : Modifiers [Untyped ]): ThisTree [Untyped ] = {
448
+ val tree = if (myMods == null || (myMods == mods)) this else clone.asInstanceOf [MemberDef [Untyped ]]
449
449
tree.setMods(mods)
450
- tree.asInstanceOf [ThisTree [T ]]
450
+ tree.asInstanceOf [ThisTree [Untyped ]]
451
451
}
452
452
453
- def withFlags (flags : FlagSet ): ThisTree [T ] = withMods(Modifiers (flags))
453
+ def withFlags (flags : FlagSet ): ThisTree [Untyped ] = withMods(Modifiers (flags))
454
454
455
455
protected def setMods (mods : Modifiers [T @ uncheckedVariance]) = myMods = mods
456
456
@@ -1253,13 +1253,10 @@ object Trees {
1253
1253
val tpt1 = transform(tpt)
1254
1254
val rhs1 = transform(rhs)
1255
1255
cpy.ValDef (tree)(name, transform(tpt1), transform(rhs1))
1256
- .withMods(tree.rawMods)
1257
1256
case tree @ DefDef (name, tparams, vparamss, tpt, rhs) =>
1258
1257
cpy.DefDef (tree)(name, transformSub(tparams), vparamss mapConserve (transformSub(_)), transform(tpt), transform(rhs))
1259
- .withMods(tree.rawMods)
1260
1258
case tree @ TypeDef (name, rhs) =>
1261
1259
cpy.TypeDef (tree)(name, transform(rhs), tree.tparams)
1262
- .withMods(tree.rawMods)
1263
1260
case Template (constr, parents, self, body) =>
1264
1261
cpy.Template (tree)(transformSub(constr), transform(parents), transformSub(self), transformStats(body))
1265
1262
case Import (expr, selectors) =>
0 commit comments