Skip to content

Commit

Permalink
Fix DottyBytecodeTests#efficientTryCases
Browse files Browse the repository at this point in the history
toTypeTree now wraps TypeTrees types with an annotation in some cases.
  • Loading branch information
smarter authored and odersky committed Feb 2, 2018
1 parent 9ea0c8b commit bee1ab6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class TryCatchPatterns extends MiniPhase {
case _ => isDefaultCase(cdef)
}

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

0 comments on commit bee1ab6

Please sign in to comment.