@@ -5,16 +5,19 @@ import org.scalatest.{Assertions, AssertionsMacro}
5
5
import org .scalatest .compatible .Assertion
6
6
7
7
trait VersionSpecificAssertionsForJUnit extends Assertions {
8
- inline override def assert (inline condition : Boolean )(implicit prettifier : Prettifier , pos : source.Position ): Assertion =
8
+ // https://github.com/lampepfl/dotty/pull/8601#pullrequestreview-380646858
9
+ implicit object UseJUnitAssertions
10
+
11
+ inline def assert (inline condition : Boolean )(implicit prettifier : Prettifier , pos : source.Position , use : UseJUnitAssertions .type ): Assertion =
9
12
$ { AssertionsForJUnitMacro .assert(' {condition}, ' {prettifier}, ' {pos}, ' {" " }) }
10
13
11
- inline override def assert (inline condition : Boolean , clue : Any )(implicit prettifier : Prettifier , pos : source.Position ): Assertion =
14
+ inline def assert (inline condition : Boolean , clue : Any )(implicit prettifier : Prettifier , pos : source.Position , use : UseJUnitAssertions . type ): Assertion =
12
15
$ { AssertionsForJUnitMacro .assert(' {condition}, ' {prettifier}, ' {pos}, ' {clue}) }
13
16
14
- inline override def assume (inline condition : Boolean )(implicit prettifier : Prettifier , pos : source.Position ): Assertion =
17
+ inline def assume (inline condition : Boolean )(implicit prettifier : Prettifier , pos : source.Position , use : UseJUnitAssertions . type ): Assertion =
15
18
$ { AssertionsForJUnitMacro .assume(' {condition}, ' {prettifier}, ' {pos}, ' {" " }) }
16
19
17
- inline override def assume (inline condition : Boolean , clue : Any )(implicit prettifier : Prettifier , pos : source.Position ): Assertion =
20
+ inline def assume (inline condition : Boolean , clue : Any )(implicit prettifier : Prettifier , pos : source.Position , use : UseJUnitAssertions . type ): Assertion =
18
21
$ { AssertionsForJUnitMacro .assume(' {condition}, ' {prettifier}, ' {pos}, ' {clue}) }
19
22
20
23
}
0 commit comments