Skip to content

Commit 5d198be

Browse files
KacperFKorbannicolasstucki
authored andcommitted
Fix after dotty#13944
(cherry picked from commit 1e71365)
1 parent a050de3 commit 5d198be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jvm/refspec/src/main/scala/org/scalatest/refspec/RefSpecLike.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ trait RefSpecLike extends TestSuite with Informing with Notifying with Alerting
129129
throw new NotAllowedException(FailureMessages.exceptionWasThrownInObject(Prettifier.default, UnquotedString(other.getClass.getName), UnquotedString(scopeDesc)), Some(other), Right((_: StackDepthException) => 9))
130130
else if (ScalaTestVersions.BuiltForScalaVersion.startsWith("2.13") || ScalaTestVersions.BuiltForScalaVersion.startsWith("3."))
131131
throw new NotAllowedException(FailureMessages.exceptionWasThrownInObject(Prettifier.default, UnquotedString(other.getClass.getName), UnquotedString(scopeDesc)), Some(other), Right((_: StackDepthException) => 7))
132+
else if (ScalaTestVersions.BuiltForScalaVersion.startsWith("3"))
133+
throw new NotAllowedException(FailureMessages.exceptionWasThrownInObject(Prettifier.default, UnquotedString(other.getClass.getName), UnquotedString(scopeDesc)), Some(other), Right((_: StackDepthException) => 7))
132134
else
133135
throw new NotAllowedException(FailureMessages.exceptionWasThrownInObject(Prettifier.default, UnquotedString(other.getClass.getName), UnquotedString(scopeDesc)), Some(other), Right((_: StackDepthException) => 8))
134136
case other: Throwable => throw other

0 commit comments

Comments
 (0)