File tree Expand file tree Collapse file tree 3 files changed +38
-1
lines changed
library/src/scala/annotation Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Scala (https://www.scala-lang.org)
3
+ *
4
+ * Copyright EPFL and Lightbend, Inc.
5
+ *
6
+ * Licensed under Apache License 2.0
7
+ * (http://www.apache.org/licenses/LICENSE-2.0).
8
+ *
9
+ * See the NOTICE file distributed with this work for
10
+ * additional information regarding copyright ownership.
11
+ */
12
+
13
+ package scala .annotation
14
+
15
+ /** An annotation for local warning suppression.
16
+ *
17
+ * The optional `value` parameter allows selectively silencing messages, see `scalac -Wconf:help`
18
+ * for help. Examples:
19
+ *
20
+ * {{{
21
+ * def f = {
22
+ * 1: @nowarn // don't warn "a pure expression does nothing in statement position"
23
+ * 2
24
+ * }
25
+ *
26
+ * @nowarn def f = { 1; deprecated() } // don't warn
27
+ *
28
+ * @nowarn("msg=pure expression does nothing")
29
+ * def f = { 1; deprecated() } // show deprecation warning
30
+ * }}}
31
+ *
32
+ * To ensure that a `@nowarn` annotation actually suppresses a warning, enable `-Xlint:nowarn`.
33
+ */
34
+ class nowarn (value : String = " " ) extends ClassfileAnnotation
Original file line number Diff line number Diff line change @@ -20,4 +20,4 @@ package scala.annotation
20
20
*
21
21
* @since 2.8
22
22
*/
23
- final class tailrec extends scala.annotation. StaticAnnotation
23
+ final class tailrec extends StaticAnnotation
Original file line number Diff line number Diff line change 12
12
13
13
package scala .annotation .unchecked
14
14
15
+ import scala .annotation .meta .{field , getter }
16
+
15
17
/** An annotation for values that are assumed to be stable even though their
16
18
* types are volatile.
17
19
*
18
20
* @since 2.7
19
21
*/
22
+ @ getter @ field
20
23
final class uncheckedStable extends scala.annotation.StaticAnnotation {}
You can’t perform that action at this time.
0 commit comments