diff options
author | Martin Odersky <odersky@gmail.com> | 2013-08-22 17:09:37 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-08-22 17:09:55 +0200 |
commit | 8d346b7ac3e668e9970e89ee600d263d7c1a2a44 (patch) | |
tree | c4009d25575d522ae0b349148e5db7af1fcfcba9 /src/dotty/tools/dotc/typer/Implicits.scala | |
parent | 749934aeafecc65c865d92056467c08540add8cc (diff) | |
download | dotty-8d346b7ac3e668e9970e89ee600d263d7c1a2a44.tar.gz dotty-8d346b7ac3e668e9970e89ee600d263d7c1a2a44.tar.bz2 dotty-8d346b7ac3e668e9970e89ee600d263d7c1a2a44.zip |
Fixing a buf in implicit search
… which caused impicit context infos to be always empty
Diffstat (limited to 'src/dotty/tools/dotc/typer/Implicits.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Implicits.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala index 74a144996..3676cc214 100644 --- a/src/dotty/tools/dotc/typer/Implicits.scala +++ b/src/dotty/tools/dotc/typer/Implicits.scala @@ -73,6 +73,11 @@ object Implicits { outerCtx.implicits.eligible(tp).filter(ref => !(shadowed contains ref.name)) } } + + override def toString = { + val own = s"(implicits: ${refs mkString ","})" + if (outerCtx == NoContext) own else own +"\n " + outerCtx.implicits + } } /** The result of an implicit search */ @@ -205,6 +210,8 @@ trait Implicits { self: Typer => /** An implicit search; parameters as in `inferImplicit` */ class ImplicitSearch(pt: Type, argument: Tree, pos: Position)(implicit ctx: Context) { + println(s"implicit search in ${ctx.owner} scope ${ctx.implicits}") + /** Try to typecheck an implicit reference */ def typedImplicit(ref: TermRef)(implicit ctx: Context): SearchResult = { val id = Ident(ref).withPos(pos) |