|
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.
|