diff options
-rw-r--r-- | src/dotty/tools/dotc/transform/MixinOps.scala | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/transform/MixinOps.scala b/src/dotty/tools/dotc/transform/MixinOps.scala index f56c83f96..db89f939b 100644 --- a/src/dotty/tools/dotc/transform/MixinOps.scala +++ b/src/dotty/tools/dotc/transform/MixinOps.scala @@ -34,9 +34,14 @@ class MixinOps(cls: ClassSymbol, thisTransform: DenotTransformer)(implicit ctx: //sup.select(target) } - /** Is `sym` a member of implementing class `cls`? */ - def isCurrent(sym: Symbol) = cls.info.member(sym.name).hasAltWith(_.symbol == sym) - + /** Is `sym` a member of implementing class `cls`? + * The test is performed at phase `thisTransform`. + */ + def isCurrent(sym: Symbol) = + ctx.atPhase(thisTransform) { implicit ctx => + cls.info.member(sym.name).hasAltWith(_.symbol == sym) + } + def needsForwarder(meth: Symbol): Boolean = { lazy val overridenSymbols = meth.allOverriddenSymbols def needsDisambiguation = !overridenSymbols.forall(_ is Deferred) |