diff options
author | Martin Odersky <odersky@gmail.com> | 2017-02-25 18:28:12 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-02-27 15:45:48 +0100 |
commit | 1aa4b56c4813117f3be3a725c404c242eccefe10 (patch) | |
tree | 2fd534f987da9f0ac6410ccc3b752e1766546bf6 /compiler/src/dotty/tools/dotc/typer/Implicits.scala | |
parent | d0162aed64def280af8aa812514d101c1563fc28 (diff) | |
download | dotty-1aa4b56c4813117f3be3a725c404c242eccefe10.tar.gz dotty-1aa4b56c4813117f3be3a725c404c242eccefe10.tar.bz2 dotty-1aa4b56c4813117f3be3a725c404c242eccefe10.zip |
Don't chain implicit conversions
When inferring a view, we are not allowed to use another
implicit conversion to adapt its result. Fixing this revealed
another problem where we have to re-enable implicit conversions
when pre-typing arguments in overloading resolution.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Implicits.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Implicits.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Implicits.scala b/compiler/src/dotty/tools/dotc/typer/Implicits.scala index d5afae90c..759cc62e9 100644 --- a/compiler/src/dotty/tools/dotc/typer/Implicits.scala +++ b/compiler/src/dotty/tools/dotc/typer/Implicits.scala @@ -496,6 +496,7 @@ trait Implicits { self: Typer => || (to isRef defn.UnitClass) || (from.tpe isRef defn.NothingClass) || (from.tpe isRef defn.NullClass) + || !(ctx.mode is Mode.ImplicitsEnabled) || (from.tpe eq NoPrefix)) NoImplicitMatches else try inferImplicit(to.stripTypeVar.widenExpr, from, from.pos) |