File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1110,6 +1110,11 @@ object SymDenotations {
11101110 enclClass(symbol, false )
11111111 }
11121112
1113+ /** Skips symbol that are not owned by a class */
1114+ def skipLocalOwners (using Context ): Symbol =
1115+ if symbol.owner.isClass then symbol
1116+ else symbol.owner.skipLocalOwners
1117+
11131118 /** A class that in source code would be lexically enclosing */
11141119 final def lexicallyEnclosingClass (using Context ): Symbol =
11151120 if (! exists || isClass) symbol else owner.lexicallyEnclosingClass
Original file line number Diff line number Diff line change @@ -70,9 +70,7 @@ trait QuotesAndSplices {
7070 }
7171
7272 private def makeInlineable (tree : Tree )(using Context ): Tree =
73- def quoteOwner (sym : Symbol ): Symbol =
74- if sym.owner.isClass then sym else quoteOwner(sym.owner)
75- inContext(ctx.withOwner(quoteOwner(ctx.owner))) {
73+ inContext(ctx.withOwner(ctx.owner.skipLocalOwners)) {
7674 PrepareInlineable .makeInlineable(tree)
7775 }
7876
You can’t perform that action at this time.
0 commit comments