Skip to content

Commit a86c712

Browse files
author
Antonio Cunei
committed
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. ........
1 parent 5cb02cf commit a86c712

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/compiler/scala/tools/nsc/transform/Mixin.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,11 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL {
892892
case DefDef(mods, name, tp, vp, tpt, rhs)
893893
if sym.isModule && (!clazz.isTrait || clazz.isImplClass) && !sym.hasFlag(BRIDGE) =>
894894
val attrThis =
895-
if (clazz.isImplClass) gen.mkAttributedIdent(vp.head.head.symbol)
896-
else gen.mkAttributedThis(clazz)
895+
if (clazz.isImplClass && !isImplementedStatically(sym))
896+
gen.mkAttributedIdent(vp.head.head.symbol)
897+
//!!! I think this can be replaced by selfRef(tree.pos)
898+
else
899+
gen.mkAttributedThis(clazz)
897900
val rhs1 = mkInnerClassAccessorDoubleChecked(attrThis, rhs)
898901
treeCopy.DefDef(stat, mods, name, tp, vp, tpt, typedPos(stat.pos)(rhs1))
899902
case _ => stat

0 commit comments

Comments
 (0)