We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ea0c8b commit bee1ab6Copy full SHA for bee1ab6
compiler/src/dotty/tools/dotc/transform/TryCatchPatterns.scala
@@ -71,7 +71,7 @@ class TryCatchPatterns extends MiniPhase {
71
case _ => isDefaultCase(cdef)
72
}
73
74
- private def isSimpleThrowable(tp: Type)(implicit ctx: Context): Boolean = tp match {
+ private def isSimpleThrowable(tp: Type)(implicit ctx: Context): Boolean = tp.stripAnnots match {
75
case tp @ TypeRef(pre, _) =>
76
(pre == NoPrefix || pre.widen.typeSymbol.isStatic) && // Does not require outer class check
77
!tp.symbol.is(Flags.Trait) && // Traits not supported by JVM
0 commit comments