diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/mill/discover/Router.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/scala/mill/discover/Router.scala b/core/src/main/scala/mill/discover/Router.scala index 90e83430..b2d222b9 100644 --- a/core/src/main/scala/mill/discover/Router.scala +++ b/core/src/main/scala/mill/discover/Router.scala @@ -254,7 +254,9 @@ class Router [C <: Context](val c: C) { import c.universe._ def getValsOrMeths(curCls: Type): Iterable[MethodSymbol] = { def isAMemberOfAnyRef(member: Symbol) = { - weakTypeOf[AnyRef].members.exists(_.name == member.name) + // AnyRef is an alias symbol, we go to the real "owner" of these methods + val anyRefSym = c.mirror.universe.definitions.ObjectClass + member.owner == anyRefSym } val extractableMembers = for { member <- curCls.members |