Skip to content

Commit a7be706

Browse files
committed
Don't pickle @nowarn annotations...
...by special-casing them. In principle we have `extends Annotation` vs `extends StaticAnnotation` for that, but sadly `ClassfileAnnotation extends StaticAnnotation`, so we don't get to choose for those :-/ Backport of 522a5c6
1 parent 52d2167 commit a7be706

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/reflect/scala/reflect/internal/AnnotationInfos.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ trait AnnotationInfos extends api.Annotations { self: SymbolTable =>
331331
/** Check whether the type or any of the arguments are erroneous */
332332
def isErroneous = atp.isErroneous || args.exists(_.isErroneous)
333333

334-
def isStatic = symbol isNonBottomSubClass StaticAnnotationClass
334+
def isStatic = symbol.isNonBottomSubClass(StaticAnnotationClass) && symbol != NowarnClass
335335

336336
/** Check whether any of the arguments mention a symbol */
337337
def refsSymbol(sym: Symbol) = hasArgWhich(_.symbol == sym)

0 commit comments

Comments
 (0)