From 5e9a40a45503eab81d58368ab7f26de7fbe458ba Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 19 Jan 2016 18:29:33 +0100 Subject: Perform isCurrent at transform phase instead of the one after it. Fixes problem with t7475b.scala --- src/dotty/tools/dotc/transform/MixinOps.scala | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/dotty/tools/dotc/transform/MixinOps.scala') 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) -- cgit v1.2.3