File tree 2 files changed +6
-3
lines changed
compiler/src/dotty/tools/dotc
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1110,6 +1110,11 @@ object SymDenotations {
1110
1110
enclClass(symbol, false )
1111
1111
}
1112
1112
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
+
1113
1118
/** A class that in source code would be lexically enclosing */
1114
1119
final def lexicallyEnclosingClass (using Context ): Symbol =
1115
1120
if (! exists || isClass) symbol else owner.lexicallyEnclosingClass
Original file line number Diff line number Diff line change @@ -70,9 +70,7 @@ trait QuotesAndSplices {
70
70
}
71
71
72
72
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)) {
76
74
PrepareInlineable .makeInlineable(tree)
77
75
}
78
76
You can’t perform that action at this time.
0 commit comments