Skip to content

Commit dc66cce

Browse files
committed
Improve some docs
1 parent cc6ca5f commit dc66cce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ object Inliner {
151151
def dropInlined(inlined: tpd.Inlined)(implicit ctx: Context): Tree = {
152152
if (enclosingInlineds.nonEmpty) inlined // Remove in the outer most inlined call
153153
else {
154-
// Position used for any tree that was inlined (including recursive inlines)
155154
val inlinedAtPos = inlined.call.pos
156155

157156
/** Removes all Inlined trees, replacing them with blocks.
@@ -166,7 +165,8 @@ object Inliner {
166165
val transformed = super.transform(tree)
167166
enclosingInlineds match {
168167
case call :: _ if call.symbol.sourceFile != ctx.owner.sourceFile =>
169-
// reposition tree inlined from some other file
168+
// Until we implement JSR-45, we cannot represent in output positions in other source files.
169+
// So, reposition inlined code from other files with the call position:
170170
transformed.withPos(inlinedAtPos)
171171
case _ => transformed
172172
}

0 commit comments

Comments
 (0)