diff options
Diffstat (limited to 'scalalib')
-rw-r--r-- | scalalib/src/main/scala/mill/scalalib/TestRunner.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scalalib/src/main/scala/mill/scalalib/TestRunner.scala b/scalalib/src/main/scala/mill/scalalib/TestRunner.scala index 7fd6079e..b734273f 100644 --- a/scalalib/src/main/scala/mill/scalalib/TestRunner.scala +++ b/scalalib/src/main/scala/mill/scalalib/TestRunner.scala @@ -30,8 +30,11 @@ object TestRunner { val cls = cl.loadClass(path.stripSuffix(".class").replace('/', '.')) fingerprints.find { case f: SubclassFingerprint => + + (f.isModule == cls.getName.endsWith("$")) && cl.loadClass(f.superclassName()).isAssignableFrom(cls) case f: AnnotatedFingerprint => + (f.isModule == cls.getName.endsWith("$")) && cls.isAnnotationPresent( cl.loadClass(f.annotationName()).asInstanceOf[Class[Annotation]] ) |