@@ -190,7 +190,7 @@ object desugar {
190190 if isSetterNeeded(vdef) then
191191 val setterParam = makeSyntheticParameter(tpt = SetterParamTree ().watching(vdef))
192192 // The rhs gets filled in later, when field is generated and getter has parameters (see Memoize miniphase)
193- val setterRhs = if (vdef.rhs.isEmpty) EmptyTree else unitLiteral
193+ val setterRhs = if (vdef.rhs.isEmpty) EmptyTree else syntheticUnitLiteral
194194 val setter = cpy.DefDef (vdef)(
195195 name = valName.setterName,
196196 paramss = (setterParam :: Nil ) :: Nil ,
@@ -1311,7 +1311,7 @@ object desugar {
13111311 def block (tree : Block )(using Context ): Block = tree.expr match {
13121312 case EmptyTree =>
13131313 cpy.Block (tree)(tree.stats,
1314- unitLiteral .withSpan(if (tree.stats.isEmpty) tree.span else tree.span.endPos))
1314+ syntheticUnitLiteral .withSpan(if (tree.stats.isEmpty) tree.span else tree.span.endPos))
13151315 case _ =>
13161316 tree
13171317 }
@@ -1811,7 +1811,7 @@ object desugar {
18111811 case ts : Thicket => ts.trees.tail
18121812 case t => Nil
18131813 } map {
1814- case Block (Nil , EmptyTree ) => unitLiteral // for s"... ${} ..."
1814+ case Block (Nil , EmptyTree ) => syntheticUnitLiteral // for s"... ${} ..."
18151815 case Block (Nil , expr) => expr // important for interpolated string as patterns, see i1773.scala
18161816 case t => t
18171817 }
@@ -1839,7 +1839,7 @@ object desugar {
18391839 val pats1 = if (tpt.isEmpty) pats else pats map (Typed (_, tpt))
18401840 flatTree(pats1 map (makePatDef(tree, mods, _, rhs)))
18411841 case ext : ExtMethods =>
1842- Block (List (ext), unitLiteral .withSpan(ext.span))
1842+ Block (List (ext), syntheticUnitLiteral .withSpan(ext.span))
18431843 case f : FunctionWithMods if f.hasErasedParams => makeFunctionWithValDefs(f, pt)
18441844 }
18451845 desugared.withSpan(tree.span)
0 commit comments