scala/scala — pull request #1675 by retronym (2012-11-26 20:50:42+00:00)
Title: SI-6667 Abort after any ambiguous in-scope implicit

Rather than continuing on to a search of implicits
of the expected type.

Previously, the companion implicits were searched if the
the caller was running the implicit search in silent
mode, for example if searching for an implicit parameter
in an application which has an expected type.

After this commit, the behaviour is consistent, regardless
on silent/non-silent typing.

Resubmission of #1659

Review by @odersky

/cc @xeno-by, who can perhaps shed light on why when I tried to shield `materializeImplicit` behind the same condition I got:

```
ticket/6667 ~/code/scala ./test/partest test/files/run/macro-expand-tparams-prefix-c1 || cat test/files/run/macro-expand-tparams-prefix-c1-run.log

Testing individual files
testing: [...]/files/run/macro-expand-tparams-prefix-c1 [FAILED]
1 of 1 tests failed (elapsed time: 00:00:02)
Impls_1.scala:7: error: ambiguous implicit values:
both value V of type c.WeakTypeTag[V]
and value T of type c.WeakTypeTag[T]
match expected type c.WeakTypeTag[T]
c.Expr(Block(List(
^
```