Skip to content

Commit

Permalink
Loosen runtime type check a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Dec 13, 2018
1 parent 3cd49e7 commit 27c0b77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/scala/scala/async/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ package object async {
throw new Exception(s"Exception of type ${classTag[T]} was not thrown")
} catch {
case t: Throwable =>
if (classTag[T].runtimeClass != t.getClass) throw t
if (!classTag[T].runtimeClass.isAssignableFrom(t.getClass)) throw t
else t.asInstanceOf[T]
}
}
Expand Down

0 comments on commit 27c0b77

Please sign in to comment.