Skip to content

Commit 91d409a

Browse files
committed
Form a single block with all assignments
1 parent 2d97525 commit 91d409a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,10 +1420,10 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
14201420
targets: List[untpd.Tree], rhs: Tree
14211421
)(using Context): Tree =
14221422
val s = mutable.ListBuffer[untpd.Tree]()
1423-
val u = formPairwiseAssignments(
1423+
formPairwiseAssignments(
14241424
s, targets, untpd.TypedSplice(rhs), rhs.tpe,
14251425
EmptyTermName)
1426-
typed(u)
1426+
typed(untpd.Block(s.toList, untpd.TypedSplice(unitLiteral)))
14271427

14281428
/** Appends to `statements` the assignments of `targets` to corresponding values in `rhs`.
14291429
*

0 commit comments

Comments
 (0)