diff options
author | Martin Odersky <odersky@gmail.com> | 2016-04-21 15:40:58 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-04-21 15:40:58 +0200 |
commit | 320ca51f0226cf61dfa6d882d30de15ab221f07b (patch) | |
tree | 15467f3d2070fb976133cd2da459be9d590295c7 /tests/neg/subtyping.scala | |
parent | f320ac848ae418b0ed9a1870c0afd7b6420d31c1 (diff) | |
download | dotty-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 'tests/neg/subtyping.scala')
-rw-r--r-- | tests/neg/subtyping.scala | 2 |
1 files changed, 1 insertions, 1 deletions
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 |