File tree 1 file changed +2
-1
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ object Inliner {
152
152
if (enclosingInlineds.nonEmpty) inlined // Remove in the outer most inlined call
153
153
else {
154
154
val inlinedAtPos = inlined.call.pos
155
+ val callSourceFile = ctx.source.file
155
156
156
157
/** Removes all Inlined trees, replacing them with blocks.
157
158
* Repositions all trees directly inside an inlined expansion of a non empty call to the position of the call.
@@ -164,7 +165,7 @@ object Inliner {
164
165
case _ =>
165
166
val transformed = super .transform(tree)
166
167
enclosingInlineds match {
167
- case call :: _ if call.symbol.sourceFile != ctx.owner.sourceFile =>
168
+ case call :: _ if call.symbol.sourceFile != callSourceFile =>
168
169
// Until we implement JSR-45, we cannot represent in output positions in other source files.
169
170
// So, reposition inlined code from other files with the call position:
170
171
transformed.withPos(inlinedAtPos)
You can’t perform that action at this time.
0 commit comments