@@ -212,17 +212,6 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
212212 setInfo OverloadedType (pre, alternatives)
213213 )
214214
215- /** for explicit outer phase */
216- final def newOuterAccessor (pos : Position ) = {
217- val accFlags = METHOD | STABLE | SYNTHETIC | (
218- if (isTrait) DEFERRED else 0
219- )
220- val sym = newMethodSymbol(nme.OUTER , pos, accFlags)
221- sym.expandName(this )
222- sym.referenced = this
223- sym
224- }
225-
226215 final def newErrorValue (name : TermName ) =
227216 newTermSymbol(name, pos, SYNTHETIC | IS_ERROR ) setInfo ErrorType
228217
@@ -285,6 +274,14 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
285274
286275 final def newClass (name : TypeName , pos : Position = NoPosition , newFlags : Long = 0L ) =
287276 newClassSymbol(name, pos, newFlags)
277+
278+ /** A new class with its info set to a ClassInfoType with given scope and parents. */
279+ def newClassWithInfo (name : TypeName , parents : List [Type ], scope : Scope , pos : Position = NoPosition , newFlags : Long = 0L ) = {
280+ val clazz = newClass(name, pos, newFlags)
281+ clazz setInfo ClassInfoType (parents, scope, clazz)
282+ }
283+ final def newErrorClass (name : TypeName ) =
284+ newClassWithInfo(name, Nil , new ErrorScope (this ), pos, SYNTHETIC | IS_ERROR )
288285
289286 final def newModuleClass (name : TypeName , pos : Position = NoPosition ) =
290287 newModuleClassSymbol(name, pos)
@@ -312,11 +309,6 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
312309 setInfo MethodType (Nil , tpe)
313310 )
314311
315- final def newErrorClass (name : TypeName ) = {
316- val clazz = newClassSymbol(name, pos, SYNTHETIC | IS_ERROR )
317- clazz setInfo ClassInfoType (Nil , new ErrorScope (this ), clazz)
318- }
319-
320312 final def newErrorSymbol (name : Name ): Symbol = name match {
321313 case x : TypeName => newErrorClass(x)
322314 case x : TermName => newErrorValue(x)
@@ -1196,7 +1188,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
11961188 oldsymbuf += sym
11971189 newsymbuf += (
11981190 if (sym.isClass)
1199- tp.typeSymbol.newAbstractType(sym.pos , sym.name.toTypeName ).setInfo(sym.existentialBound)
1191+ tp.typeSymbol.newAbstractType(sym.name.toTypeName , sym.pos ).setInfo(sym.existentialBound)
12001192 else
12011193 sym.cloneSymbol(tp.typeSymbol))
12021194 }
@@ -1346,15 +1338,15 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
13461338 cloneSymbol(owner)
13471339
13481340 /** A clone of this symbol, but with given owner. */
1349- final def cloneSymbol (owner : Symbol ): Symbol = {
1350- val newSym = cloneSymbolImpl(owner, this .rawflags)
1341+ final def cloneSymbol (owner : Symbol ): Symbol = cloneSymbol(owner, this .rawflags)
1342+ final def cloneSymbol (owner : Symbol , newFlags : Long ): Symbol = {
1343+ val newSym = cloneSymbolImpl(owner, newFlags)
13511344 ( newSym
13521345 setPrivateWithin privateWithin
13531346 setInfo (info cloneInfo newSym)
13541347 setAnnotations this .annotations
13551348 )
13561349 }
1357-
13581350 /** Internal method to clone a symbol's implementation with the given flags and no info. */
13591351 def cloneSymbolImpl (owner : Symbol , newFlags : Long ): Symbol
13601352 def cloneSymbolImpl (owner : Symbol ): Symbol = cloneSymbolImpl(owner, 0L )
0 commit comments