aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-04-21 15:40:58 +0200
committerMartin Odersky <odersky@gmail.com>2016-04-21 15:40:58 +0200
commit320ca51f0226cf61dfa6d882d30de15ab221f07b (patch)
tree15467f3d2070fb976133cd2da459be9d590295c7 /src/dotty/tools/dotc/typer/Typer.scala
parentf320ac848ae418b0ed9a1870c0afd7b6420d31c1 (diff)
downloaddotty-320ca51f0226cf61dfa6d882d30de15ab221f07b.tar.gz
dotty-320ca51f0226cf61dfa6d882d30de15ab221f07b.tar.bz2
dotty-320ca51f0226cf61dfa6d882d30de15ab221f07b.zip
Avoid propagating unresolved implicits
When an implicit argument is not found, we should in any case assume the result type of the implicit method as the type of the tree (after reporting an error, of course). If we don't do that, we get implicit errors on weird positions when we try to find an implicit argument for the same tree again. This caused a spurious error in subtyping.scala, and also caused an additional error at the end of EqualityStrawman1.scala.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-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 53296f9c9..b95acc7ca 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -1529,7 +1529,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
}
def issueErrors() = {
for (err <- errors) ctx.error(err(), tree.pos.endPos)
- tree
+ tree.withType(wtp.resultType)
}
val args = (wtp.paramNames, wtp.paramTypes).zipped map { (pname, formal) =>
def where = d"parameter $pname of $methodStr"