We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3cd49e7 commit 27c0b77Copy full SHA for 27c0b77
src/test/scala/scala/async/package.scala
@@ -35,7 +35,7 @@ package object async {
35
throw new Exception(s"Exception of type ${classTag[T]} was not thrown")
36
} catch {
37
case t: Throwable =>
38
- if (classTag[T].runtimeClass != t.getClass) throw t
+ if (!classTag[T].runtimeClass.isAssignableFrom(t.getClass)) throw t
39
else t.asInstanceOf[T]
40
}
41
0 commit comments