We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f812984 commit 44c0133Copy full SHA for 44c0133
compiler/src/dotty/tools/dotc/transform/PostTyper.scala
@@ -392,9 +392,9 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
392
case _ if tpd.exprPurity(tree) >= TreeInfo.Idempotent =>
393
tree
394
case _ =>
395
- val vdef = SyntheticValDef(TempResultName.fresh(), tree)
+ val vdef = SyntheticValDef(TempResultName.fresh(), tree).withSpan(tree.span)
396
lifted += vdef
397
- Ident(vdef.namedType)
+ Ident(vdef.namedType).withSpan(tree.span)
398
val pureTrees = trees.mapConserve(liftIfImpure)
399
Block(lifted.toList, within(pureTrees))
400
else within(trees)
0 commit comments