aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/ImportInfo.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-09-06 22:15:47 +0200
committerMartin Odersky <odersky@gmail.com>2013-09-06 22:15:47 +0200
commit2aa0615594744a7fd92f5f4d017b47e5c42a793a (patch)
tree90e4458cf2cbfdc03152588eebacb031513197ac /src/dotty/tools/dotc/typer/ImportInfo.scala
parentf7ab848229e8b9b0de1b719725816209aa1271c8 (diff)
downloaddotty-2aa0615594744a7fd92f5f4d017b47e5c42a793a.tar.gz
dotty-2aa0615594744a7fd92f5f4d017b47e5c42a793a.tar.bz2
dotty-2aa0615594744a7fd92f5f4d017b47e5c42a793a.zip
Improvements in implicits error reporting
Plus a few bugfixes for implicits
Diffstat (limited to 'src/dotty/tools/dotc/typer/ImportInfo.scala')
-rw-r--r--src/dotty/tools/dotc/typer/ImportInfo.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/ImportInfo.scala b/src/dotty/tools/dotc/typer/ImportInfo.scala
index 89ffc1f29..92b980c01 100644
--- a/src/dotty/tools/dotc/typer/ImportInfo.scala
+++ b/src/dotty/tools/dotc/typer/ImportInfo.scala
@@ -76,7 +76,7 @@ class ImportInfo(val sym: Symbol, val selectors: List[untpd.Tree], val rootImpor
}
/** The implicit references imported by this import clause */
- def importedImplicits: Set[TermRef] = {
+ def importedImplicits: List[TermRefBySym] = {
val pre = site
if (wildcardImport) {
val refs = pre.implicitMembers
@@ -84,9 +84,9 @@ class ImportInfo(val sym: Symbol, val selectors: List[untpd.Tree], val rootImpor
else refs filterNot (ref => excluded contains ref.name.toTermName)
} else
for {
- name <- originals
- denot <- pre.member(name).altsWith(_ is Implicit)
- } yield TermRef(pre, name) withDenot denot
+ renamed <- reverseMapping.keys
+ denot <- pre.member(reverseMapping(renamed)).altsWith(_ is Implicit)
+ } yield TermRef.withSym(pre, renamed, denot.symbol.asTerm).withDenot(denot)
}
override def toString = {