aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-04-13 12:40:19 +0200
committerMartin Odersky <odersky@gmail.com>2014-04-14 15:17:35 +0200
commite5ae4a707b2bb78f0777660b0661a3162bf646df (patch)
treef4a5886bf8295834d2e9de6548aaee7450877e19 /src/dotty/tools/dotc/core/Types.scala
parent732a690ad2ef78450f6b8852b0f1f0ba892b392d (diff)
downloaddotty-e5ae4a707b2bb78f0777660b0661a3162bf646df.tar.gz
dotty-e5ae4a707b2bb78f0777660b0661a3162bf646df.tar.bz2
dotty-e5ae4a707b2bb78f0777660b0661a3162bf646df.zip
Fixing prefix of implicit members
Implicit members are TermRefs that should have a prefix corresponding to the object of which they are a member. They used to have the ThisType of their owner before. `implicits2` provides a way to verify that the change works. It would be good to turn this into a more robust test at some point. But it's not high preiority, so I prefer no test to a fragile test.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index c348e246c..ecad89afc 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -449,7 +449,7 @@ object Types {
final def implicitMembers(implicit ctx: Context): List[TermRef] = track("implicitMembers") {
memberDenots(implicitFilter,
(name, buf) => buf ++= member(name).altsWith(_ is Implicit))
- .toList.map(_.termRefWithSig)
+ .toList.map(d => TermRef.withSig(this, d.symbol.asTerm))
}
/** The info of `sym`, seen as a member of this type. */
@@ -1311,7 +1311,7 @@ object Types {
if (prefix eq NoPrefix) withNonMemberSym(prefix, name, sym)
else {
if (sym.defRunId != NoRunId && sym.isCompleted) withSig(prefix, name, sym.signature)
- else apply(prefix, name)
+ else apply(prefix, name)
} withSym (sym, Signature.NotAMethod)
def withSig(prefix: Type, sym: TermSymbol)(implicit ctx: Context): TermRef =