Skip to content

Commit a898baf

Browse files
Merge pull request #11382 from dotty-staging/sjs-fix-junit-tests-from-supertypes
Fix #11276: Scala.js: Take JUnit tests from superclasses/traits into account.
2 parents 0ea52d6 + 62eb9ee commit a898baf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,11 @@ class JUnitBootstrappers extends MiniPhase {
304304
ref(param).cast(clazz.typeRef)
305305

306306
private def annotatedMethods(owner: ClassSymbol, annot: Symbol)(using Context): List[Symbol] =
307-
owner.info.decls.filter(m => m.is(Method) && m.hasAnnotation(annot))
307+
owner.info
308+
.membersBasedOnFlags(Method, EmptyFlags)
309+
.filter(_.symbol.hasAnnotation(annot))
310+
.map(_.symbol)
311+
.toList
308312
}
309313

310314
object JUnitBootstrappers {

0 commit comments

Comments
 (0)