diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-09-14 10:45:43 +0200 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-09-17 20:26:08 +0200 |
commit | 6b9e1a0747159128da1e84795c1be6698e16ee43 (patch) | |
tree | 78922e7ef36a25cbdd473f2f5e44986ed9727a36 /src | |
parent | 6854842cf88f020289b783983d13ebef4d7605f4 (diff) | |
download | scala-6b9e1a0747159128da1e84795c1be6698e16ee43.tar.gz scala-6b9e1a0747159128da1e84795c1be6698e16ee43.tar.bz2 scala-6b9e1a0747159128da1e84795c1be6698e16ee43.zip |
Revert "Fixes SI-6189."
This reverts commit 5a8dfad583b825158cf0abdae5d73a4a7f8cd997.
Conflicts:
src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/icode/GenICode.scala | 10 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/CleanUp.scala | 1 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala index 0bccd5fe0e..697c2bf23b 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala @@ -900,17 +900,13 @@ abstract class GenICode extends SubComponent { case app @ Apply(fun @ Select(qual, _), args) if !ctx.method.symbol.isStaticConstructor - && fun.symbol.isAccessor && fun.symbol.accessed.hasStaticAnnotation - && qual.tpe.typeSymbol.orElse(fun.symbol.owner).companionClass != NoSymbol => + && fun.symbol.isAccessor && fun.symbol.accessed.hasStaticAnnotation => // bypass the accessor to the companion object and load the static field directly - // this bypass is not done: - // - if the static intializer for the static field itself - // - if there is no companion class of the object owner - this happens in the REPL + // the only place were this bypass is not done, is the static intializer for the static field itself def genLoadApply5 = { val sym = fun.symbol generatedType = toTypeKind(sym.accessed.info) - val hostOwner = qual.tpe.typeSymbol.orElse(sym.owner) - val hostClass = hostOwner.companionClass + val hostClass = qual.tpe.typeSymbol.orElse(sym.owner).companionClass val staticfield = hostClass.info.findMember(sym.accessed.name, NoFlags, NoFlags, false) if (sym.isGetter) { diff --git a/src/compiler/scala/tools/nsc/transform/CleanUp.scala b/src/compiler/scala/tools/nsc/transform/CleanUp.scala index 62a0c78c5c..a705e85310 100644 --- a/src/compiler/scala/tools/nsc/transform/CleanUp.scala +++ b/src/compiler/scala/tools/nsc/transform/CleanUp.scala @@ -783,7 +783,6 @@ abstract class CleanUp extends Transform with ast.TreeDSL { // add field definition to new defs newStaticMembers append stfieldDef newStaticInits append stfieldInit - case _ => // ignore @static on other members } } |