aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t2429.scala
Commit message (Collapse)AuthorAgeFilesLines
* Replace tabs with 4 spaces in Dotty tests.Dmitry Petrashko2015-04-091-0/+0
|
* Fix of pos/t2429Martin Odersky2014-05-201-0/+25
This was a hard nut to crack. The problem exemplified by t2429 is that in a situation like val x: T = foo(...) where `foo` needs implicit parameters the expected result type `T` is propagated into the typechecking of foo(...) and consequently also into the implicit parameter search. This is often necessary, for instance to instantiate type parameters. But it can lead to overconstrained searches if in fact the right expansion is val x: T = viewToT(foo(...)(implicit params)) where `viewToT` is some implicit conversion. The fix handles that case by re-hecking the application foo(...) with an empty result type, if the implicit parameter search fails. But the re-checking is very subtle as is explained in the comment to `TyperState#tryWithFallback`.