diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-04-02 11:24:27 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-04-02 11:59:02 +0200 |
commit | d1c7f8d451d29f6f5d7ccf665c35acbe96ed4680 (patch) | |
tree | d2de3478d169f1e96ce39aaa8ef3e13d9ccfc152 /test/files/neg/t8463.check | |
parent | 8489be16b57a08f51bf3655c99cede52477b3022 (diff) | |
download | scala-d1c7f8d451d29f6f5d7ccf665c35acbe96ed4680.tar.gz scala-d1c7f8d451d29f6f5d7ccf665c35acbe96ed4680.tar.bz2 scala-d1c7f8d451d29f6f5d7ccf665c35acbe96ed4680.zip |
SI-8463 Avoid unpositioned errors from search for views
Ideally, I'd like to fix this using `saveErrors = false` here to
firewall the enclosing context from the ambiguiouty error encountered
during implicit search.
I originally proposed that patch as a fix for SI-8419 in
https://github.com/scala/scala/pull/3460 but withdrew from
that approach as I uncovered a deeper bug that meant that
we actually shouldn't have even been looking for views in
that case.
But, this runs into SI-8230 and these failures:
test/partest --update-check \
/Users/jason/code/scala/test/files/pos/t2504.scala \
/Users/jason/code/scala/test/files/pos/t4457_1.scala \
/Users/jason/code/scala/test/files/neg/t4457_2.scala
Turns out that typechecking the ostensible straight forward
application, `Array("abc")`, hinges on us leaking an ambiguity
error from `viewExists` to find a path through overload resolution!
This commit takes a tiny step forward by using `context.tree`
rather than `EmptyTree` as the argument to `inferImplicit`.
This avoids unpositioned type errors.
Diffstat (limited to 'test/files/neg/t8463.check')
-rw-r--r-- | test/files/neg/t8463.check | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/neg/t8463.check b/test/files/neg/t8463.check new file mode 100644 index 0000000000..1a3eea2870 --- /dev/null +++ b/test/files/neg/t8463.check @@ -0,0 +1,10 @@ +t8463.scala:5: error: type mismatch; + found : Long + required: ?T[Long] +Note that implicit conversions are not applicable because they are ambiguous: + both method longWrapper in class LowPriorityImplicits of type (x: Long)scala.runtime.RichLong + and method ArrowAssoc in object Predef of type [A](self: A)ArrowAssoc[A] + are possible conversion functions from Long to ?T[Long] + insertCell(Foo(5)) + ^ +one error found |