Commit 3cbb5aa
committed
Fix #7949: sbt test discovery should not run traits
Traits don't have the `Abstract` flag set, so we need to also check for
the `Trait` flag, otherwise
https://github.com/sbt/zinc/blob/cdd2a20f110e1eb4a713597b553d57b823466f75/internal/zinc-apiinfo/src/main/scala/xsbt/api/Discovery.scala#L74
will return true for traits, making them eligible for test discovery.
Also reorder checks to short-circuit checking for flags when possible.1 parent 2f719f8 commit 3cbb5aa
File tree
3 files changed
+20
-2
lines changed- compiler/src/dotty/tools/dotc/sbt
- sbt-dotty/sbt-test/discovery/test-discovery/src/test/scala
3 files changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
587 | | - | |
| 586 | + | |
| 587 | + | |
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments