Skip to content

Commit 55a223c

Browse files
committed
Fix dependent variable approximation for by-name parameters
1 parent 22d9782 commit 55a223c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Inferencing.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ trait Inferencing { this: Typer =>
690690

691691
val arg = findArg(call)
692692
if !arg.isEmpty then
693-
var argType = arg.tpe
693+
var argType = arg.tpe.widenExpr.widenTermRefExpr
694694
if !argType.isSingleton then argType = SkolemType(argType)
695695
argType <:< tvar
696696
case _ =>

0 commit comments

Comments
 (0)