summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2009-11-10 10:39:40 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2009-11-10 10:39:40 +0000
commiteea79567f1a02299f714daec11faf008d40648bd (patch)
tree9e4e3708a0cebd2beb0f8bd0b00af84f7ddc28d9 /src
parenta0159da70da18f65863947aa4d016ca52fd7bb4f (diff)
downloadscala-eea79567f1a02299f714daec11faf008d40648bd.tar.gz
scala-eea79567f1a02299f714daec11faf008d40648bd.tar.bz2
scala-eea79567f1a02299f714daec11faf008d40648bd.zip
fixed #2511.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/transform/Mixin.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala
index 36479586a7..0daad7f2a7 100644
--- a/src/compiler/scala/tools/nsc/transform/Mixin.scala
+++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala
@@ -278,13 +278,16 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL {
// member is a value of type unit. No field needed
;
case _ =>
+ // atPhase: the private field is moved to the implementation class by erasure,
+ // so it can no longer be found in the member's owner (the trait)
+ val accessed = atPhase(currentRun.picklerPhase)(member.accessed)
// otherwise mixin a field as well
addMember(clazz,
clazz.newValue(member.pos, nme.getterToLocal(member.name))
setFlag (LOCAL | PRIVATE | member.getFlag(MUTABLE | LAZY))
setFlag (if (!member.hasFlag(STABLE)) MUTABLE else 0)
setInfo member.tpe.resultType
- setAnnotations member.annotations)
+ setAnnotations accessed.annotations)
}
}
} else if (member hasFlag SUPERACCESSOR) { // mixin super accessors