diff options
author | Martin Odersky <odersky@gmail.com> | 2013-09-18 09:40:26 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-09-18 09:40:26 +0200 |
commit | 283c41637ce5e50655c31e729fa4c0baf3ece185 (patch) | |
tree | b0dfae2b98e126c9119d9cbbbd39a7627b3b1023 /src/dotty/tools/dotc/typer/Implicits.scala | |
parent | 64a312432ca2cded23ca2d9244276231c52a52c2 (diff) | |
download | dotty-283c41637ce5e50655c31e729fa4c0baf3ece185.tar.gz dotty-283c41637ce5e50655c31e729fa4c0baf3ece185.tar.bz2 dotty-283c41637ce5e50655c31e729fa4c0baf3ece185.zip |
Experimental branch that drops {Term/Type}RefWithSym types
Diffstat (limited to 'src/dotty/tools/dotc/typer/Implicits.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Implicits.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala index 2de8985d9..91bc769e9 100644 --- a/src/dotty/tools/dotc/typer/Implicits.scala +++ b/src/dotty/tools/dotc/typer/Implicits.scala @@ -66,7 +66,7 @@ object Implicits { * name, b, whereas the name of the symbol is the original name, a. * @param outerCtx the next outer context that makes visible further implicits */ - class ContextualImplicits(val refs: List[TermRefBySym], val outerCtx: Context)(initctx: Context) extends ImplicitRefs { + class ContextualImplicits(val refs: List[TermRef], val outerCtx: Context)(initctx: Context) extends ImplicitRefs { implicit val ctx: Context = if (initctx == NoContext) initctx else initctx retractMode Mode.ImplicitsEnabled @@ -187,7 +187,7 @@ trait ImplicitRunInfo { self: RunInfo => val pre = tp.prefix comps ++= implicitScope(pre).companionRefs def addClassScope(cls: ClassSymbol): Unit = { - def addRef(companion: TermRefBySym): Unit = { + def addRef(companion: TermRef): Unit = { val comp1 @ TermRef(p, _) = companion.asSeenFrom(pre, companion.symbol.owner) comps += TermRef.withSym(p, comp1.symbol.asTerm).withDenot(comp1.denot) } @@ -373,10 +373,10 @@ trait Implicits { self: Typer => } /** A set of term references where equality is =:= */ -class TermRefSet(implicit ctx: Context) extends mutable.Traversable[TermRefBySym] { +class TermRefSet(implicit ctx: Context) extends mutable.Traversable[TermRef] { private val elems = new mutable.LinkedHashMap[TermSymbol, List[Type]] - def += (ref: TermRefBySym): Unit = { + def += (ref: TermRef): Unit = { val pre = ref.prefix val sym = ref.symbol.asTerm elems get sym match { @@ -387,10 +387,10 @@ class TermRefSet(implicit ctx: Context) extends mutable.Traversable[TermRefBySym } } - def ++= (refs: TraversableOnce[TermRefBySym]): Unit = + def ++= (refs: TraversableOnce[TermRef]): Unit = refs foreach += - override def foreach[U](f: TermRefBySym => U): Unit = + override def foreach[U](f: TermRef => U): Unit = for (sym <- elems.keysIterator) for (pre <- elems(sym)) f(TermRef.withSym(pre, sym)) |