Skip to content

Commit 762023b

Browse files
committed
chore: add scala.language.2 to files in scala.annotation
1 parent da1c550 commit 762023b

33 files changed

+64
-0
lines changed

library/src/scala/annotation/Annotation.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* A base class for annotations.
1719
*

library/src/scala/annotation/ClassfileAnnotation.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/** A base class for classfile annotations. These are stored as
1618
* [[https://docs.oracle.com/javase/8/docs/technotes/guides/language/annotations.html Java annotations]]
1719
* in classfiles.

library/src/scala/annotation/ConstantAnnotation.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* Annotation classes extending this trait only accept constant values as arguments.
1719
*

library/src/scala/annotation/StaticAnnotation.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* A base class for static annotations. These are available to the Scala type checker or Scala
1719
* reflection, even across different compilation units.

library/src/scala/annotation/TypeConstraint.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/** A marker for annotations that, when applied to a type, should be treated
1618
* as a constraint on the annotated type.
1719
*

library/src/scala/annotation/compileTimeOnly.scala

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
1516
import scala.annotation.meta._
1617

1718
/**

library/src/scala/annotation/elidable.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/** An annotation for methods whose bodies may be excluded
1618
* from compiler-generated bytecode.
1719
*

library/src/scala/annotation/implicitAmbiguous.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* To customize the error message that's emitted when an implicit search finds
1719
* multiple ambiguous values, annotate at least one of the implicit values

library/src/scala/annotation/implicitNotFound.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* To customize the error message that's emitted when an implicit of type
1719
* `C[T1,..., TN]` cannot be found, annotate the class `C` with `@implicitNotFound`.

library/src/scala/annotation/meta/beanGetter.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation.meta
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* Consult the documentation in package [[scala.annotation.meta]].
1719
*/

library/src/scala/annotation/meta/beanSetter.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation.meta
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* Consult the documentation in package [[scala.annotation.meta]].
1719
*/

library/src/scala/annotation/meta/companionClass.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation.meta
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* When defining an implicit class, the Scala compiler creates an implicit
1719
* conversion method for it. Annotations `@companionClass` and `@companionMethod`

library/src/scala/annotation/meta/companionMethod.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation.meta
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* When defining an implicit class, the Scala compiler creates an implicit
1719
* conversion method for it. Annotations `@companionClass` and `@companionMethod`

library/src/scala/annotation/meta/companionObject.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation.meta
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* Currently unused; intended as an annotation target for classes such as case classes
1719
* that automatically generate a companion object

library/src/scala/annotation/meta/defaultArg.scala

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
package scala.annotation
1414
package meta
1515

16+
import scala.language.`2`
17+
1618
/**
1719
* This internal meta annotation is used by the compiler to support default annotation arguments.
1820
*

library/src/scala/annotation/meta/field.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation.meta
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* Consult the documentation in package [[scala.annotation.meta]].
1719
*/

library/src/scala/annotation/meta/getter.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation.meta
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* Consult the documentation in package [[scala.annotation.meta]].
1719
*/

library/src/scala/annotation/meta/languageFeature.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation.meta
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* An annotation giving particulars for a language feature in object `scala.language`.
1719
*/

library/src/scala/annotation/meta/package.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* When defining a field, the Scala compiler creates up to four accessors
1719
* for it: a getter, a setter, and if the field is annotated with

library/src/scala/annotation/meta/param.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation.meta
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* Consult the documentation in package [[scala.annotation.meta]].
1719
*/

library/src/scala/annotation/meta/setter.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation.meta
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* Consult the documentation in package [[scala.annotation.meta]].
1719
*/

library/src/scala/annotation/meta/superArg.scala

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
package scala.annotation
1414
package meta
1515

16+
import scala.language.`2`
17+
1618
/**
1719
* This internal annotation encodes arguments passed to annotation superclasses. Example:
1820
*

library/src/scala/annotation/migration.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* An annotation that marks a member as having changed semantics
1719
* between versions. This is intended for methods which for one

library/src/scala/annotation/nowarn.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/** An annotation for local warning suppression.
1618
*
1719
* The optional `value` parameter allows selectively silencing messages. See `-Wconf:help` for help

library/src/scala/annotation/showAsInfix.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/**
1618
* This annotation configures how Scala prints two-parameter generic types.
1719
*

library/src/scala/annotation/strictfp.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/** If this annotation is present on a method or its enclosing class,
1618
* the strictfp flag will be emitted.
1719
*/

library/src/scala/annotation/switch.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/** An annotation to be applied to a match expression. If present,
1618
* the compiler will verify that the match has been compiled to a
1719
* [[https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-3.html#jvms-3.10 tableswitch or lookupswitch]]

library/src/scala/annotation/tailrec.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/** A method annotation which verifies that the method will be compiled
1618
* with tail call optimization.
1719
*

library/src/scala/annotation/unchecked/uncheckedStable.scala

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
package scala.annotation.unchecked
1414

15+
import scala.language.`2`
1516
import scala.annotation.meta.{field, getter}
1617

1718
/** An annotation for values that are assumed to be stable even though their

library/src/scala/annotation/unchecked/uncheckedVariance.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation.unchecked
1414

15+
import scala.language.`2`
16+
1517
/** An annotation for type arguments for which one wants to suppress variance checking.
1618
*/
1719
final class uncheckedVariance extends scala.annotation.StaticAnnotation {}

library/src/scala/annotation/unspecialized.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/** A method annotation which suppresses the creation of
1618
* additional specialized forms based on enclosing specialized
1719
* type parameters.

library/src/scala/annotation/unused.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/** Mark an element unused for a given context.
1618
*
1719
* Unused warnings are suppressed for elements known to be unused.

library/src/scala/annotation/varargs.scala

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
package scala.annotation
1414

15+
import scala.language.`2`
16+
1517
/** A method annotation which instructs the compiler to generate a
1618
* Java varargs-style forwarder method for interop. This annotation can
1719
* only be applied to methods with repeated parameters.

0 commit comments

Comments
 (0)