Skip to content

Commit 67f1cbf

Browse files
committed
Form a single block with all assignments
1 parent edd8ccf commit 67f1cbf

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
@@ -1201,10 +1201,10 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
12011201
targets: List[untpd.Tree], rhs: Tree
12021202
)(using Context): Tree =
12031203
val s = mutable.ListBuffer[untpd.Tree]()
1204-
val u = formPairwiseAssignments(
1204+
formPairwiseAssignments(
12051205
s, targets, untpd.TypedSplice(rhs), rhs.tpe,
12061206
EmptyTermName)
1207-
typed(u)
1207+
typed(untpd.Block(s.toList, untpd.TypedSplice(unitLiteral)))
12081208

12091209
/** Appends to `statements` the assignments of `targets` to corresponding values in `rhs`.
12101210
*

0 commit comments

Comments
 (0)