diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/AddInterfaces.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/AddInterfaces.scala | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala index 39e2cbe694..dde166d64b 100644 --- a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala +++ b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala @@ -43,11 +43,7 @@ abstract class AddInterfaces extends InfoTransform { self: Erasure => */ private def isInterfaceMember(sym: Symbol) = ( sym.isType || { - // !!! Shouldn't the following code be equivalent to leaving - // out the "sym.info" call and starting with "sym.initialize.isMethod" ? - // Because, it is not, which I found a little disturbing. The compiler - // fails to bootstrap with an error somewhere. - sym.info // initialize to set lateMETHOD flag if necessary + sym.info // initialize to set lateMETHOD flag if necessary ( sym.isMethod && !sym.isLabel @@ -71,6 +67,7 @@ abstract class AddInterfaces extends InfoTransform { self: Erasure => /** Return the implementation class of a trait; create a new one of one does not yet exist */ def implClass(iface: Symbol): Symbol = { iface.info + def implClassFlags = iface.flags & ~(INTERFACE | lateINTERFACE) | IMPLCLASS implClassMap.getOrElse(iface, { atPhase(implClassPhase) { @@ -101,7 +98,7 @@ abstract class AddInterfaces extends InfoTransform { self: Erasure => else log("not unlinking existing " + impl + " as the impl class is not visible on the classpath.") } if (impl == NoSymbol) { - impl = iface.cloneSymbolImpl(iface.owner) + impl = iface.cloneSymbolImpl(iface.owner, implClassFlags) impl.name = implName impl.sourceFile = iface.sourceFile if (iface.owner.isClass) @@ -109,7 +106,7 @@ abstract class AddInterfaces extends InfoTransform { self: Erasure => } if (currentRun.compiles(iface)) currentRun.symSource(impl) = iface.sourceFile impl setPos iface.pos - impl.flags = iface.flags & ~(INTERFACE | lateINTERFACE) | IMPLCLASS + impl.flags = implClassFlags impl setInfo new LazyImplClassType(iface) implClassMap(iface) = impl debuglog( |