Skip to content

Commit 5e9a40a

Browse files
committed
Perform isCurrent at transform phase
instead of the one after it. Fixes problem with t7475b.scala
1 parent 0ae58a5 commit 5e9a40a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/dotty/tools/dotc/transform/MixinOps.scala

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,14 @@ class MixinOps(cls: ClassSymbol, thisTransform: DenotTransformer)(implicit ctx:
3434
//sup.select(target)
3535
}
3636

37-
/** Is `sym` a member of implementing class `cls`? */
38-
def isCurrent(sym: Symbol) = cls.info.member(sym.name).hasAltWith(_.symbol == sym)
39-
37+
/** Is `sym` a member of implementing class `cls`?
38+
* The test is performed at phase `thisTransform`.
39+
*/
40+
def isCurrent(sym: Symbol) =
41+
ctx.atPhase(thisTransform) { implicit ctx =>
42+
cls.info.member(sym.name).hasAltWith(_.symbol == sym)
43+
}
44+
4045
def needsForwarder(meth: Symbol): Boolean = {
4146
lazy val overridenSymbols = meth.allOverriddenSymbols
4247
def needsDisambiguation = !overridenSymbols.forall(_ is Deferred)

0 commit comments

Comments
 (0)