diff options
author | Martin Odersky <odersky@gmail.com> | 2015-02-28 11:55:14 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-03-18 11:14:12 +0100 |
commit | dd5be327395cb4a6380467e5e7c85cc0d7a5e70d (patch) | |
tree | 6b47afc03c39440a05e28b58b5c12e3614649cfb /src/dotty/tools/dotc/typer/Implicits.scala | |
parent | 42333cebbb7329a4488b7ebe1896ff2a723f4cb2 (diff) | |
download | dotty-dd5be327395cb4a6380467e5e7c85cc0d7a5e70d.tar.gz dotty-dd5be327395cb4a6380467e5e7c85cc0d7a5e70d.tar.bz2 dotty-dd5be327395cb4a6380467e5e7c85cc0d7a5e70d.zip |
Fix implicit problem in RefinedPrinter.
The implicit def was shadowed by a following import. Scalac did not detect the problem probably because
the import and the def were in the same scope. But selecting the member explicitly would have caused an error
because the import came after the definition. So arguably this was in error, but scalac did not detect
it correctly.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Implicits.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Implicits.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala index 53968ae91..23938ea99 100644 --- a/src/dotty/tools/dotc/typer/Implicits.scala +++ b/src/dotty/tools/dotc/typer/Implicits.scala @@ -501,7 +501,7 @@ trait Implicits { self: Typer => if (ctx.typerState.reporter.hasErrors) nonMatchingImplicit(ref) else if (contextual && !shadowing.tpe.isError && !refMatches(shadowing)) { - implicits.println(i"SHADOWING $ref is shadowed by $shadowing") + implicits.println(i"SHADOWING $ref in ${ref.termSymbol.owner} is shadowed by $shadowing in ${shadowing.symbol.owner}") shadowedImplicit(ref, methPart(shadowing).tpe) } else |