aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/MixinOps.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-01-19 18:29:33 +0100
committerMartin Odersky <odersky@gmail.com>2016-01-19 18:29:33 +0100
commit5e9a40a45503eab81d58368ab7f26de7fbe458ba (patch)
tree3d228f864a29c970c3921c64cf705fda8109b51a /src/dotty/tools/dotc/transform/MixinOps.scala
parent0ae58a58498d4659e4877f6c3dd836c22e90013d (diff)
downloaddotty-5e9a40a45503eab81d58368ab7f26de7fbe458ba.tar.gz
dotty-5e9a40a45503eab81d58368ab7f26de7fbe458ba.tar.bz2
dotty-5e9a40a45503eab81d58368ab7f26de7fbe458ba.zip
Perform isCurrent at transform phase
instead of the one after it. Fixes problem with t7475b.scala
Diffstat (limited to 'src/dotty/tools/dotc/transform/MixinOps.scala')
-rw-r--r--src/dotty/tools/dotc/transform/MixinOps.scala11
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)