@@ -188,7 +188,7 @@ object desugar {
188188 if isSetterNeeded(vdef) then
189189 val setterParam = makeSyntheticParameter(tpt = SetterParamTree ().watching(vdef))
190190 // The rhs gets filled in later, when field is generated and getter has parameters (see Memoize miniphase)
191- val setterRhs = if (vdef.rhs.isEmpty) EmptyTree else unitLiteral
191+ val setterRhs = if (vdef.rhs.isEmpty) EmptyTree else syntheticUnitLiteral
192192 val setter = cpy.DefDef (vdef)(
193193 name = valName.setterName,
194194 paramss = (setterParam :: Nil ) :: Nil ,
@@ -1489,7 +1489,7 @@ object desugar {
14891489 def block (tree : Block )(using Context ): Block = tree.expr match {
14901490 case EmptyTree =>
14911491 cpy.Block (tree)(tree.stats,
1492- unitLiteral .withSpan(if (tree.stats.isEmpty) tree.span else tree.span.endPos))
1492+ syntheticUnitLiteral .withSpan(if (tree.stats.isEmpty) tree.span else tree.span.endPos))
14931493 case _ =>
14941494 tree
14951495 }
@@ -2013,7 +2013,7 @@ object desugar {
20132013 case ts : Thicket => ts.trees.tail
20142014 case t => Nil
20152015 } map {
2016- case Block (Nil , EmptyTree ) => unitLiteral // for s"... ${} ..."
2016+ case Block (Nil , EmptyTree ) => syntheticUnitLiteral // for s"... ${} ..."
20172017 case Block (Nil , expr) => expr // important for interpolated string as patterns, see i1773.scala
20182018 case t => t
20192019 }
@@ -2046,7 +2046,7 @@ object desugar {
20462046 val pats1 = if (tpt.isEmpty) pats else pats map (Typed (_, tpt))
20472047 flatTree(pats1 map (makePatDef(tree, mods, _, rhs)))
20482048 case ext : ExtMethods =>
2049- Block (List (ext), unitLiteral .withSpan(ext.span))
2049+ Block (List (ext), syntheticUnitLiteral .withSpan(ext.span))
20502050 case f : FunctionWithMods if f.hasErasedParams => makeFunctionWithValDefs(f, pt)
20512051 }
20522052 desugared.withSpan(tree.span)
0 commit comments