Skip to content

Commit 69957bb

Browse files
committed
Positioned.withPos: Only cast where needed
1 parent 6044a54 commit 69957bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/ast/Positioned.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ abstract class Positioned extends DotClass with Product {
3434
* destructively and the item itself is returned.
3535
*/
3636
def withPos(pos: Position): this.type = {
37-
val newpd = (if (pos == curPos || curPos.isSynthetic) this else clone).asInstanceOf[Positioned]
37+
val newpd = (if (pos == curPos || curPos.isSynthetic) this else clone.asInstanceOf[Positioned])
3838
newpd.setPos(pos)
3939
newpd.asInstanceOf[this.type]
4040
}

0 commit comments

Comments
 (0)