@annotation.nowarn("msg=Auto") @annotation.nowarn("msg=procedure") def f { println }
but 2.12 gives
<console>:11: error: class nowarn may not appear multiple times on method f
@annotation.nowarn("msg=Auto") @annotation.nowarn("msg=procedure") def f { println }
because on 2.12 nowarn extends ClassfileAnnotation to ensure the argument is a constant. This triggers
This works on 2.13
but 2.12 gives
because on 2.12
nowarn extends ClassfileAnnotation
to ensure the argument is a constant. This triggershttps://github.com/scala/scala/blob/v2.12.18/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala#L1481