Skip to content

Commit 527aa31

Browse files
committed
Fix -Wunused:privates trait accessor
1 parent ae24d64 commit 527aa31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ object CheckUnused:
356356
def registerDef(memDef: tpd.MemberDef)(using Context): Unit =
357357
// register the annotations for usage
358358
registerUsedAnnotation(memDef.symbol)
359-
if !memDef.symbol.isUnusedAnnot then
359+
if !memDef.symbol.isUnusedAnnot && !memDef.symbol.isAllOf(Flags.AccessorCreationFlags) then
360360
if memDef.symbol.is(Param) && !isSyntheticMainParam(memDef.symbol) && !memDef.symbol.ownerIsTrivial then
361361
if memDef.symbol.isOneOf(GivenOrImplicit) then
362362
implicitParamInScope += memDef

0 commit comments

Comments
 (0)