Skip to content

Commit bee1ab6

Browse files
smarterodersky
authored andcommitted
Fix DottyBytecodeTests#efficientTryCases
toTypeTree now wraps TypeTrees types with an annotation in some cases.
1 parent 9ea0c8b commit bee1ab6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/TryCatchPatterns.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class TryCatchPatterns extends MiniPhase {
7171
case _ => isDefaultCase(cdef)
7272
}
7373

74-
private def isSimpleThrowable(tp: Type)(implicit ctx: Context): Boolean = tp match {
74+
private def isSimpleThrowable(tp: Type)(implicit ctx: Context): Boolean = tp.stripAnnots match {
7575
case tp @ TypeRef(pre, _) =>
7676
(pre == NoPrefix || pre.widen.typeSymbol.isStatic) && // Does not require outer class check
7777
!tp.symbol.is(Flags.Trait) && // Traits not supported by JVM

0 commit comments

Comments
 (0)