@@ -773,7 +773,7 @@ object Prop {
773
773
/*
774
774
* Returns the first failed result in Left or success in Right.
775
775
*/
776
- def getFirstFailure (xs : Stream [T ], exceptionFilter : Option [Class [_]]): Either [(T ,Result ),(T ,Result )] = {
776
+ def getFirstFailure (xs : Stream [T ], exceptionFilter : Option [Class [_ <: Throwable ]]): Either [(T ,Result ),(T ,Result )] = {
777
777
assert(! xs.isEmpty, " Stream cannot be empty" )
778
778
val results = xs.map(x => (x, result(x)))
779
779
results.dropWhile {
@@ -788,7 +788,7 @@ object Prop {
788
788
def shrinker (x : T , r : Result , shrinks : Int , orig : T ): Result = {
789
789
val xs = shrink(x)
790
790
val res = r.addArg(Arg (labels,x,shrinks,orig,pp(x),pp(orig)))
791
- val originalException = Some (r.status).collect { case NonFatal (e) => e.getClass() }
791
+ val originalException = Some (r.status).collect { case Prop . Exception (e) => e.getClass }
792
792
if (xs.isEmpty) res else getFirstFailure(xs, originalException) match {
793
793
case Right ((x2,r2)) => res
794
794
case Left ((x2,r2)) => shrinker(x2, replOrig(r,r2), shrinks+ 1 , orig)
0 commit comments