File tree 1 file changed +7
-4
lines changed
compiler/src/dotty/tools/dotc/typer 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1507,10 +1507,13 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
1507
1507
if knownFormal && ! formal.isExactlyNothing then
1508
1508
formal
1509
1509
else
1510
- inferredFromTarget(param, formal, calleeType, paramIndex).orElse(
1511
- if knownFormal then formal
1512
- else errorType(AnonymousFunctionMissingParamType (param, tree, formal), param.srcPos)
1513
- )
1510
+ val fromTarget = inferredFromTarget(param, formal, calleeType, paramIndex)
1511
+ if fromTarget.exists then
1512
+ if knownFormal && (fromTarget ne formal) then
1513
+ println(i " DIFF for param $i of $tree with pt = $pt, formal = $formal, from target = $fromTarget" )
1514
+ fromTarget
1515
+ else if knownFormal then formal
1516
+ else errorType(AnonymousFunctionMissingParamType (param, tree, formal), param.srcPos)
1514
1517
val paramTpt = untpd.TypedSplice (
1515
1518
(if knownFormal then InferredTypeTree () else untpd.TypeTree ())
1516
1519
.withType(paramType.translateFromRepeated(toArray = false ))
You can’t perform that action at this time.
0 commit comments