Skip to content

Commit

Permalink
Don't pickle @nowarn annotations...
Browse files Browse the repository at this point in the history
...by special-casing them.

In principle we have `extends Annotation` vs `extends StaticAnnotation`
for that, but sadly `ConstantAnnotation extends StaticAnnotation`, so
we don't get to choose for those :-/
  • Loading branch information
lrytz committed Feb 10, 2021
1 parent 51790d7 commit 522a5c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reflect/scala/reflect/internal/Symbols.scala
Expand Up @@ -124,7 +124,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
def isJavaEnum: Boolean = hasJavaEnumFlag
def isJavaAnnotation: Boolean = hasJavaAnnotationFlag
def isStaticAnnotation: Boolean =
hasJavaAnnotationFlag || isNonBottomSubClass(StaticAnnotationClass)
hasJavaAnnotationFlag || isNonBottomSubClass(StaticAnnotationClass) && this != NowarnClass

def newNestedSymbol(name: Name, pos: Position, newFlags: Long, isClass: Boolean): Symbol = name match {
case n: TermName => newTermSymbol(n, pos, newFlags)
Expand Down

0 comments on commit 522a5c6

Please sign in to comment.