@@ -68,27 +68,18 @@ abstract class Positioned(implicit @transientParam src: SourceFile) extends Prod
68
68
* node have their span set to the end position of the envelope of all children to
69
69
* the left, or, if that one does not exist, to the start position of the envelope
70
70
* of all children to the right.
71
- *
72
- * @param ignoreTypeTrees If true, don't count type trees in the union.
73
- * This is used to decide whether we need to pickle a position for a tree.
74
- * TypeTreesare pickled as types and therefore contribute nothing to the span union.
75
71
*/
76
- def envelope (src : SourceFile , startSpan : Span = NoSpan , ignoreTypeTrees : Boolean = false ): Span = this match {
72
+ def envelope (src : SourceFile , startSpan : Span = NoSpan ): Span = this match {
77
73
case Trees .Inlined (call, _, _) =>
78
- // println(s"envelope of $this # $uniqueId = ${call.span}")
79
74
call.span
80
75
case _ =>
81
76
def include (span : Span , x : Any ): Span = x match {
82
- case p : Trees .TypeTree [_] if ignoreTypeTrees =>
83
- span
84
- case core.tasty.TreePickler .Hole if ignoreTypeTrees =>
85
- span
86
77
case p : Positioned =>
87
78
if (p.source `ne` src) span
88
79
else if (p.span.exists) span.union(p.span)
89
80
else if (span.exists) {
90
81
if (span.end != MaxOffset )
91
- p.span = p.envelope(src, span.endPos, ignoreTypeTrees )
82
+ p.span = p.envelope(src, span.endPos)
92
83
span
93
84
}
94
85
else // No span available to assign yet, signal this by returning a span with MaxOffset end
0 commit comments