Skip to content

Commit fa06a98

Browse files
oderskyKordyjan
authored andcommitted
Optimization: Only expand line accessor names in extensible classes
1 parent e35a914 commit fa06a98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ object PrepareInlineable {
5353
*/
5454
abstract class MakeInlineableMap(val inlineSym: Symbol) extends TreeMap with Insert {
5555
def accessorNameOf(name: TermName, site: Symbol)(using Context): TermName =
56-
InlineAccessorName(name).expandedName(site)
56+
val accName = InlineAccessorName(name)
57+
if site.isExtensibleClass then accName.expandedName(site) else accName
5758

5859
/** A definition needs an accessor if it is private, protected, or qualified private
5960
* and it is not part of the tree that gets inlined. The latter test is implemented

0 commit comments

Comments
 (0)