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 64f8aa2 commit 3aadd24Copy full SHA for 3aadd24
src/dotty/tools/dotc/ast/TypePositions.scala
@@ -15,6 +15,7 @@ object TypePositions {
15
/** Encapsulates a type and the position of a corresponding tree */
16
case class PosAnnot(pos: Position) extends Annotation {
17
def tree(implicit ctx: Context) = EmptyTree
18
+ override def toString = pos.toString
19
}
20
21
/** An object to handle the point positions of definitions */
@@ -122,7 +123,7 @@ object TypePositions {
122
123
124
tpe1 match {
125
case AnnotatedType(_, _: PosAnnot) => tpe1
- 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
127
128
129
convert(tree, tree.tpe)
0 commit comments