diff options
author | Ingo Maier <ingo.maier@epfl.ch> | 2010-05-04 15:06:23 +0000 |
---|---|---|
committer | Ingo Maier <ingo.maier@epfl.ch> | 2010-05-04 15:06:23 +0000 |
commit | 115d774e47e2b3ada792af776aab9a2a289a83c4 (patch) | |
tree | b881db1bd19bca4aba595b2d093f96bb86c451a4 /src/compiler | |
parent | 2c0731e106db1f6220f65e0997da13cf5188a39a (diff) | |
download | scala-115d774e47e2b3ada792af776aab9a2a289a83c4.tar.gz scala-115d774e47e2b3ada792af776aab9a2a289a83c4.tar.bz2 scala-115d774e47e2b3ada792af776aab9a2a289a83c4.zip |
Fixed #3274. No review.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala index f2b896dc96..ee5bc040f5 100644 --- a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala +++ b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala @@ -324,7 +324,9 @@ abstract class ExplicitOuter extends InfoTransform val path = if (mixinClass.owner.isTerm) THIS(mixinClass.owner.enclClass) else gen.mkAttributedQualifier(currentClass.thisType baseType mixinClass prefix) - val rhs = ExplicitOuterTransformer.this.transform(path) + // Need to cast for nested outer refs in presence of self-types. See ticket #3274. + val rhs = gen.mkAsInstanceOf(ExplicitOuterTransformer.this.transform(path), + outerAcc.info.resultType) // @S: atPos not good enough because of nested atPos in DefDef method, which gives position from wrong class! rhs setPos currentClass.pos |