File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -905,16 +905,9 @@ object CheckUnused:
905905 def isCanEqual : Boolean =
906906 sym.isOneOf(GivenOrImplicit ) && sym.info.finalResultType.baseClasses.exists(_.derivesFrom(defn.CanEqualClass ))
907907 def isMarkerTrait : Boolean =
908- def isEmptyInterface (info : Type ): Boolean =
909- info.allMembers.forall: d =>
910- val m = d.symbol
911- ! m.isTerm || m.isSelfSym || m.is(Method ) && (m.owner == defn.AnyClass || m.owner == defn.ObjectClass )
912- if sym.isClass then isEmptyInterface(sym.info)
913- else if sym.is(Deferred ) then
914- sym.info match
915- case TypeBounds (_, hi) => hi == defn.AnyType || isEmptyInterface(hi)
916- case _ => true
917- else false
908+ sym.info.hiBound.allMembers.forall: d =>
909+ val m = d.symbol
910+ ! m.isTerm || m.isSelfSym || m.is(Method ) && (m.owner == defn.AnyClass || m.owner == defn.ObjectClass )
918911 def isEffectivelyPrivate : Boolean =
919912 sym.is(Private , butNot = ParamAccessor )
920913 || sym.owner.isAnonymousClass && ! sym.isEffectivelyOverride
You can’t perform that action at this time.
0 commit comments