aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-04-21 11:59:43 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-05-08 21:48:08 +0200
commit8298eb20b072d405aad71ae6c390a4939c8f090f (patch)
tree18bb813e53ebf5503df794a4a2fa2c7d69b29f28 /src
parent6f7fc527560891b2fc520a53a4c21b3a36ae0fed (diff)
downloaddotty-8298eb20b072d405aad71ae6c390a4939c8f090f.tar.gz
dotty-8298eb20b072d405aad71ae6c390a4939c8f090f.tar.bz2
dotty-8298eb20b072d405aad71ae6c390a4939c8f090f.zip
Addiong an adapt to implicit parameters.
Implicit parameters were not adapted to the formal argument before which caused a -Ycheck violation. Todo: we should find out whether we can do without the adapt in typedImplicit whose result is afterwards thrown away.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index e4acff536..d46b13818 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -1137,7 +1137,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
def where = d"parameter $pname of $methodStr"
inferImplicit(formal, EmptyTree, tree.pos.endPos) match {
case SearchSuccess(arg, _, _) =>
- arg
+ adapt(arg, formal)
case ambi: AmbiguousImplicits =>
implicitArgError(s"ambiguous implicits: ${ambi.explanation} of $where")
case failure: SearchFailure =>