diff options
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) |