@@ -190,7 +190,7 @@ object desugar {
190
190
if isSetterNeeded(vdef) then
191
191
val setterParam = makeSyntheticParameter(tpt = SetterParamTree ().watching(vdef))
192
192
// 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
194
194
val setter = cpy.DefDef (vdef)(
195
195
name = valName.setterName,
196
196
paramss = (setterParam :: Nil ) :: Nil ,
@@ -1311,7 +1311,7 @@ object desugar {
1311
1311
def block (tree : Block )(using Context ): Block = tree.expr match {
1312
1312
case EmptyTree =>
1313
1313
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))
1315
1315
case _ =>
1316
1316
tree
1317
1317
}
@@ -1811,7 +1811,7 @@ object desugar {
1811
1811
case ts : Thicket => ts.trees.tail
1812
1812
case t => Nil
1813
1813
} map {
1814
- case Block (Nil , EmptyTree ) => unitLiteral // for s"... ${} ..."
1814
+ case Block (Nil , EmptyTree ) => syntheticUnitLiteral // for s"... ${} ..."
1815
1815
case Block (Nil , expr) => expr // important for interpolated string as patterns, see i1773.scala
1816
1816
case t => t
1817
1817
}
@@ -1839,7 +1839,7 @@ object desugar {
1839
1839
val pats1 = if (tpt.isEmpty) pats else pats map (Typed (_, tpt))
1840
1840
flatTree(pats1 map (makePatDef(tree, mods, _, rhs)))
1841
1841
case ext : ExtMethods =>
1842
- Block (List (ext), unitLiteral .withSpan(ext.span))
1842
+ Block (List (ext), syntheticUnitLiteral .withSpan(ext.span))
1843
1843
case f : FunctionWithMods if f.hasErasedParams => makeFunctionWithValDefs(f, pt)
1844
1844
}
1845
1845
desugared.withSpan(tree.span)
0 commit comments