Skip to content

Commit fe12f46

Browse files
committed
Drop superfluous braces
1 parent 5c111ff commit fe12f46

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,14 +1462,15 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
14621462
val arity =
14631463
if (defn.isFunctionType(pt))
14641464
if (!isFullyDefined(pt, ForceDegree.none) && isFullyDefined(wtp, ForceDegree.none))
1465-
// prioritize method parameter types over expected types as parameter types of the eta-expanded closure
1465+
// if method type is fully defined, but expected type is not,
1466+
// prioritize method parameter types as parameter types of the eta-expanded closure
14661467
0
14671468
else defn.functionArity(pt)
14681469
else if (pt eq AnyFunctionProto) wtp.paramTypes.length
14691470
else -1
1470-
if (arity >= 0 && !tree.symbol.isConstructor) {
1471+
if (arity >= 0 && !tree.symbol.isConstructor)
14711472
typed(etaExpand(tree, wtp, arity), pt)
1472-
} else if (wtp.paramTypes.isEmpty)
1473+
else if (wtp.paramTypes.isEmpty)
14731474
adaptInterpolated(tpd.Apply(tree, Nil), pt, EmptyTree)
14741475
else if (wtp.isImplicit)
14751476
err.typeMismatch(tree, pt)

0 commit comments

Comments
 (0)