@@ -130,21 +130,17 @@ object Inliner {
130
130
* Any tree directly inside an empty call (inlined in the inlined code) retains their position.
131
131
*/
132
132
class Reposition extends TreeMap {
133
- override def transform (tree : Tree )(implicit ctx : Context ): Tree = {
134
- if (tree.source != ctx.source && tree.source.exists)
135
- transform(tree)(ctx.withSource(tree.source))
136
- else tree match {
137
- case tree : Inlined => transformInline(tree)
138
- case _ =>
139
- val transformed = super .transform(tree)
140
- enclosingInlineds match {
141
- case call :: _ if call.symbol.source != curSource =>
142
- // Until we implement JSR-45, we cannot represent in output positions in other source files.
143
- // So, reposition inlined code from other files with the call position:
144
- transformed.withSpan(inlined.call.span)
145
- case _ => transformed
146
- }
147
- }
133
+ override def transform (tree : Tree )(implicit ctx : Context ): Tree = tree match {
134
+ case tree : Inlined => transformInline(tree)
135
+ case _ =>
136
+ val transformed = super .transform(tree)
137
+ enclosingInlineds match {
138
+ case call :: _ if call.symbol.source != curSource =>
139
+ // Until we implement JSR-45, we cannot represent in output positions in other source files.
140
+ // So, reposition inlined code from other files with the call position:
141
+ transformed.withSpan(inlined.call.span)
142
+ case _ => transformed
143
+ }
148
144
}
149
145
def transformInline (tree : Inlined )(implicit ctx : Context ): Tree = {
150
146
tpd.seq(transformSub(tree.bindings), transform(tree.expansion)(inlineContext(tree.call)))
0 commit comments