aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Implicits.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-17 18:32:11 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-17 18:32:37 +0100
commitc1c933d6f936a7975ca316c69d7639145eed36e7 (patch)
tree5ea46185fa361532d0914336c7eda1fddb7c8b5b /src/dotty/tools/dotc/typer/Implicits.scala
parentd0b09e431ad6974c7ebc0a7734d46050ec712fa1 (diff)
downloaddotty-c1c933d6f936a7975ca316c69d7639145eed36e7.tar.gz
dotty-c1c933d6f936a7975ca316c69d7639145eed36e7.tar.bz2
dotty-c1c933d6f936a7975ca316c69d7639145eed36e7.zip
Fixes for by-name arguments
Previously, we did not strip off the => when comparing against expected type.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Implicits.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Implicits.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala
index 48b8bafe0..a6cbd58d1 100644
--- a/src/dotty/tools/dotc/typer/Implicits.scala
+++ b/src/dotty/tools/dotc/typer/Implicits.scala
@@ -263,13 +263,14 @@ trait Implicits { self: Typer =>
*/
def inferImplicit(pt: Type, argument: Tree, pos: Position)(implicit ctx: Context): SearchResult = track("inferImplicit") {
ctx.traceIndented(s"search implicit ${pt.show}, arg = ${argument.show}: ${argument.tpe.show}", show = true) {
+ assert(!(pt isRef defn.ByNameParamClass))
val isearch =
if (ctx.settings.explaintypes.value) new ExplainedImplicitSearch(pt, argument, pos)
else new ImplicitSearch(pt, argument, pos)
val result = isearch.bestImplicit
result match {
case success: SearchSuccess =>
- println(s"committing to ${success.tstate.show}")
+ // println(s"committing to ${success.tstate.show}")
success.tstate.commit()
case _ =>
}