Skip to content

Commit 045ca90

Browse files
committed
Remove unnecessary newScope in newNormalizedClassSymbol
This was added in #14026
1 parent d466f9f commit 045ca90

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
345345
}
346346
else parents
347347
val cls = newNormalizedClassSymbol(owner, tpnme.ANON_CLASS, Synthetic | Final, parents1,
348-
newScope, coord = fns.map(_.span).reduceLeft(_ union _))
348+
coord = fns.map(_.span).reduceLeft(_ union _))
349349
val constr = newConstructor(cls, Synthetic, Nil, Nil).entered
350350
def forwarder(fn: TermSymbol, name: TermName) = {
351351
val fwdMeth = fn.copy(cls, name, Synthetic | Method | Final).entered.asTerm

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,6 @@ object Symbols {
564564
name: TypeName,
565565
flags: FlagSet,
566566
parentTypes: List[Type],
567-
decls: Scope,
568567
selfInfo: Type = NoType,
569568
privateWithin: Symbol = NoSymbol,
570569
coord: Coord = NoCoord,

compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class ExpandSAMs extends MiniPhase:
127127
val parents = List(
128128
defn.AbstractPartialFunctionClass.typeRef.appliedTo(anonTpe.firstParamTypes.head, anonTpe.resultType),
129129
defn.SerializableType)
130-
val pfSym = newNormalizedClassSymbol(anonSym.owner, tpnme.ANON_CLASS, Synthetic | Final, parents, newScope, coord = tree.span)
130+
val pfSym = newNormalizedClassSymbol(anonSym.owner, tpnme.ANON_CLASS, Synthetic | Final, parents, coord = tree.span)
131131

132132
def overrideSym(sym: Symbol) = sym.copy(
133133
owner = pfSym,

compiler/src/dotty/tools/dotc/typer/Implicits.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ final class SearchRoot extends SearchHistory:
17991799
// }
18001800

18011801
val parents = List(defn.ObjectType, defn.SerializableType)
1802-
val classSym = newNormalizedClassSymbol(ctx.owner, LazyImplicitName.fresh().toTypeName, Synthetic | Final, parents, newScope, coord = span)
1802+
val classSym = newNormalizedClassSymbol(ctx.owner, LazyImplicitName.fresh().toTypeName, Synthetic | Final, parents, coord = span)
18031803
val vsyms = pruned.map(_._1.symbol)
18041804
val nsyms = vsyms.map(vsym => newSymbol(classSym, vsym.name, EmptyFlags, vsym.info, coord = span).entered)
18051805
val vsymMap = (vsyms zip nsyms).toMap

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ object Inliner {
199199

200200
val UnApply(fun, implicits, patterns) = unapp
201201
val sym = unapp.symbol
202-
val cls = newNormalizedClassSymbol(ctx.owner, tpnme.ANON_CLASS, Synthetic | Final, List(defn.ObjectType), newScope, coord = sym.coord)
202+
val cls = newNormalizedClassSymbol(ctx.owner, tpnme.ANON_CLASS, Synthetic | Final, List(defn.ObjectType), coord = sym.coord)
203203
val constr = newConstructor(cls, Synthetic, Nil, Nil, coord = sym.coord).entered
204204

205205
val targs = fun match

0 commit comments

Comments
 (0)