Skip to content

Commit 3aadd24

Browse files
committed
Also pickle synthetic type positions.
1 parent 64f8aa2 commit 3aadd24

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dotty/tools/dotc/ast/TypePositions.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ object TypePositions {
1515
/** Encapsulates a type and the position of a corresponding tree */
1616
case class PosAnnot(pos: Position) extends Annotation {
1717
def tree(implicit ctx: Context) = EmptyTree
18+
override def toString = pos.toString
1819
}
1920

2021
/** An object to handle the point positions of definitions */
@@ -122,7 +123,7 @@ object TypePositions {
122123
}
123124
tpe1 match {
124125
case AnnotatedType(_, _: PosAnnot) => tpe1
125-
case _ => if (!tree.pos.isSynthetic) AnnotatedType(tpe1, PosAnnot(tree.pos)) else tpe1
126+
case _ => if (tree.pos.exists) AnnotatedType(tpe1, PosAnnot(tree.pos)) else tpe1
126127
}
127128
}
128129
convert(tree, tree.tpe)

0 commit comments

Comments
 (0)