From a86c712925e4319a068e74fef16a958609da40cc Mon Sep 17 00:00:00 2001 From: Antonio Cunei Date: Wed, 11 May 2011 12:42:28 +0000 Subject: Merged revisions 24927 via svnmerge from https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk ........ r24927 | odersky | 2011-05-11 14:40:23 +0200 (Wed, 11 May 2011) | 1 line Further narrowing down the applicability of Hubert's patch, to reduce the risk we break something else. Review by dragos. Review by plocinic. ........ --- src/compiler/scala/tools/nsc/transform/Mixin.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala index ac4f19f69d..943b0e2644 100644 --- a/src/compiler/scala/tools/nsc/transform/Mixin.scala +++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala @@ -892,8 +892,11 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL { case DefDef(mods, name, tp, vp, tpt, rhs) if sym.isModule && (!clazz.isTrait || clazz.isImplClass) && !sym.hasFlag(BRIDGE) => val attrThis = - if (clazz.isImplClass) gen.mkAttributedIdent(vp.head.head.symbol) - else gen.mkAttributedThis(clazz) + if (clazz.isImplClass && !isImplementedStatically(sym)) + gen.mkAttributedIdent(vp.head.head.symbol) + //!!! I think this can be replaced by selfRef(tree.pos) + else + gen.mkAttributedThis(clazz) val rhs1 = mkInnerClassAccessorDoubleChecked(attrThis, rhs) treeCopy.DefDef(stat, mods, name, tp, vp, tpt, typedPos(stat.pos)(rhs1)) case _ => stat -- cgit v1.2.3