File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ object Inliner {
152152 if (enclosingInlineds.nonEmpty) inlined // Remove in the outer most inlined call
153153 else {
154154 val inlinedAtPos = inlined.call.pos
155+ val callSourceFile = ctx.source.file
155156
156157 /** Removes all Inlined trees, replacing them with blocks.
157158 * 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 {
164165 case _ =>
165166 val transformed = super .transform(tree)
166167 enclosingInlineds match {
167- case call :: _ if call.symbol.sourceFile != ctx.owner.sourceFile =>
168+ case call :: _ if call.symbol.sourceFile != callSourceFile =>
168169 // Until we implement JSR-45, we cannot represent in output positions in other source files.
169170 // So, reposition inlined code from other files with the call position:
170171 transformed.withPos(inlinedAtPos)
You can’t perform that action at this time.
0 commit comments