Skip to content

Commit c03b965

Browse files
committed
Fix problem in eta expansion.
Failure to do a widen caused by-name parameters to go undetected.
1 parent 76a056f commit c03b965

File tree

3 files changed

+1
-1
lines changed

3 files changed

+1
-1
lines changed

src/dotty/tools/dotc/typer/EtaExpansion.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ object EtaExpansion {
5858
* and replace by the idents of so created ValDefs.
5959
*/
6060
def liftArgs(defs: mutable.ListBuffer[Tree], methType: Type, args: List[Tree])(implicit ctx: Context) =
61-
methType match {
61+
methType.widen match {
6262
case MethodType(paramNames, paramTypes) =>
6363
(args, paramNames, paramTypes).zipped map { (arg, name, tp) =>
6464
if (tp.isInstanceOf[ExprType]) arg
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)