aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
-rw-r--r--tests/neg/subtyping.scala2
2 files changed, 2 insertions, 2 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"
diff --git a/tests/neg/subtyping.scala b/tests/neg/subtyping.scala
index ff3c7a519..27cc0568e 100644
--- a/tests/neg/subtyping.scala
+++ b/tests/neg/subtyping.scala
@@ -6,7 +6,7 @@ class A extends B
object Test {
def test1(): Unit = {
implicitly[B#X <:< A#X] // error: no implicit argument
- } // error: no implicit argument
+ }
def test2(): Unit = {
val a : { type T; type U } = ??? // error // error
implicitly[a.T <:< a.U] // error: no implicit argument