summaryrefslogtreecommitdiff
path: root/test/files/pos/overloaded_ho_fun.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-10194: Fix abstract type resolution for overloaded HOFsStefan Zeiger2017-02-211-0/+15
| | | | | | Types in the applicable overload alternatives need to be seen from the respective owners of the individual alternative, not from the target’s owner (which can be a subtype of the types that define the methods).
* Propagate overloaded function type to expected arg typeAdriaan Moors2016-08-121-0/+51
Infer missing parameter types for function literals passed to higher-order overloaded methods by deriving the expected argument type from the function types in the overloaded method type's argument types. This eases the pain caused by methods becoming overloaded because SAM types and function types are compatible, which used to disable parameter type inference because for overload resolution arguments are typed without expected type, while typedFunction needs the expected type to infer missing parameter types for function literals. It also aligns us with dotty. The special case for function literals seems reasonable, as it has precedent, and it just enables the special case in typing function literals (derive the param types from the expected type). Since this does change type inference, you can opt out using the Scala 2.11 source level. Fix scala/scala-dev#157