Skip to content

Commit 8f344c7

Browse files
Don't do ExpandPrivate checks on synthetic methods
1 parent 28e3e32 commit 8f344c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/ExpandPrivate.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ExpandPrivate extends MiniPhase with IdentityDenotTransformer { thisPhase
6666
private def ensurePrivateAccessible(d: SymDenotation)(using Context) =
6767
if (isVCPrivateParamAccessor(d))
6868
d.ensureNotPrivate.installAfter(thisPhase)
69-
else if (d.is(PrivateTerm) && !d.owner.is(Package) && d.owner != ctx.owner.lexicallyEnclosingClass && !d.is(InlineProxy)) {
69+
else if (d.is(PrivateTerm) && !d.owner.is(Package) && d.owner != ctx.owner.lexicallyEnclosingClass && !d.is(InlineProxy) && !d.is(Synthetic)) {
7070
// Paths `p1` and `p2` are similar if they have a common suffix that follows
7171
// possibly different directory paths. That is, their common suffix extends
7272
// in both cases either to the start of the path or to a file separator character.

0 commit comments

Comments
 (0)