summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-12-06 04:04:56 +0000
committerPaul Phillips <paulp@improving.org>2010-12-06 04:04:56 +0000
commit8922c4ed092a2fb4c3f6002f7c49d304f299cd02 (patch)
tree7ca9c695328777ad292deac95b4c0347b6c38280
parentb6db478a9641dd488f00fab0c0a113ef83fec5d3 (diff)
downloadscala-8922c4ed092a2fb4c3f6002f7c49d304f299cd02.tar.gz
scala-8922c4ed092a2fb4c3f6002f7c49d304f299cd02.tar.bz2
scala-8922c4ed092a2fb4c3f6002f7c49d304f299cd02.zip
Moved ClassfileAnnotation/StaticAnnotation/Anno...
Moved ClassfileAnnotation/StaticAnnotation/Annotation/TypeConstraint into scala.annotation and enabled the deprecated type aliases in scala.* to point there. Also enclosed is a new starr to bootstrap. No review.
-rw-r--r--lib/scala-compiler.jar.desired.sha12
-rw-r--r--lib/scala-library-src.jar.desired.sha12
-rw-r--r--lib/scala-library.jar.desired.sha12
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Definitions.scala16
-rw-r--r--src/continuations/library/scala/util/continuations/ControlContext.scala4
-rw-r--r--src/library/scala/Predef.scala10
-rw-r--r--src/library/scala/SerialVersionUID.scala2
-rw-r--r--src/library/scala/annotation/Annotation.scala (renamed from src/library/scala/Annotation.scala)4
-rw-r--r--src/library/scala/annotation/ClassfileAnnotation.scala (renamed from src/library/scala/ClassfileAnnotation.scala)4
-rw-r--r--src/library/scala/annotation/StaticAnnotation.scala (renamed from src/library/scala/StaticAnnotation.scala)6
-rw-r--r--src/library/scala/annotation/TypeConstraint.scala (renamed from src/library/scala/TypeConstraint.scala)4
-rw-r--r--src/library/scala/annotation/elidable.scala2
-rw-r--r--src/library/scala/annotation/implicitNotFound.scala2
-rw-r--r--src/library/scala/annotation/migration.scala2
-rw-r--r--src/library/scala/annotation/serializable.scala2
-rw-r--r--src/library/scala/annotation/strictfp.scala2
-rw-r--r--src/library/scala/annotation/switch.scala2
-rw-r--r--src/library/scala/annotation/tailrec.scala2
-rw-r--r--src/library/scala/annotation/target/beanGetter.scala2
-rw-r--r--src/library/scala/annotation/target/beanSetter.scala2
-rw-r--r--src/library/scala/annotation/target/field.scala2
-rw-r--r--src/library/scala/annotation/target/getter.scala2
-rw-r--r--src/library/scala/annotation/target/param.scala2
-rw-r--r--src/library/scala/annotation/target/setter.scala2
-rw-r--r--src/library/scala/annotation/unchecked/uncheckedStable.scala2
-rw-r--r--src/library/scala/annotation/unchecked/uncheckedVariance.scala2
-rw-r--r--src/library/scala/annotation/varargs.scala2
-rw-r--r--src/library/scala/cloneable.scala2
-rw-r--r--src/library/scala/deprecated.scala2
-rw-r--r--src/library/scala/deprecatedName.scala2
-rw-r--r--src/library/scala/inline.scala2
-rw-r--r--src/library/scala/native.scala2
-rw-r--r--src/library/scala/noinline.scala2
-rw-r--r--src/library/scala/package.scala15
-rw-r--r--src/library/scala/reflect/BeanProperty.scala2
-rw-r--r--src/library/scala/reflect/BooleanBeanProperty.scala2
-rw-r--r--src/library/scala/remote.scala2
-rw-r--r--src/library/scala/specialized.scala2
-rw-r--r--src/library/scala/throws.scala2
-rw-r--r--src/library/scala/transient.scala2
-rw-r--r--src/library/scala/volatile.scala2
-rw-r--r--test/files/neg/bug935.check4
-rw-r--r--test/files/neg/bug935.scala2
-rw-r--r--test/files/run/constrained-types.check8
-rw-r--r--test/files/run/constrained-types.scala8
45 files changed, 73 insertions, 78 deletions
diff --git a/lib/scala-compiler.jar.desired.sha1 b/lib/scala-compiler.jar.desired.sha1
index ac63ca2407..3fa1fccfa3 100644
--- a/lib/scala-compiler.jar.desired.sha1
+++ b/lib/scala-compiler.jar.desired.sha1
@@ -1 +1 @@
-c473aab0828c313bfa7b119558c499ba11777ba7 ?scala-compiler.jar
+65f6a6844c953bf382f58f917b8598eb68bc7cca ?scala-compiler.jar
diff --git a/lib/scala-library-src.jar.desired.sha1 b/lib/scala-library-src.jar.desired.sha1
index b12ef96305..9de4216368 100644
--- a/lib/scala-library-src.jar.desired.sha1
+++ b/lib/scala-library-src.jar.desired.sha1
@@ -1 +1 @@
-ed14f90898dd96ec9eed5e85279267308a3691c5 ?scala-library-src.jar
+7eefa1dc56e2fc5915826a7e7e92148d276bf345 ?scala-library-src.jar
diff --git a/lib/scala-library.jar.desired.sha1 b/lib/scala-library.jar.desired.sha1
index b849570372..8d556de26f 100644
--- a/lib/scala-library.jar.desired.sha1
+++ b/lib/scala-library.jar.desired.sha1
@@ -1 +1 @@
-c6a890c5bc9df14ea7d57ed6f0928ab92097b1b1 ?scala-library.jar
+a85cfc60d37f72ac1e46322b1e2565b17ef347fd ?scala-library.jar
diff --git a/src/compiler/scala/tools/nsc/symtab/Definitions.scala b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
index 9cfa17996c..1c39e582df 100644
--- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
@@ -120,9 +120,9 @@ trait Definitions extends reflect.generic.StandardDefinitions {
lazy val UninitializedErrorClass = getClass("scala.UninitializedFieldError")
// annotations
- lazy val AnnotationClass = getClass("scala.Annotation")
- lazy val ClassfileAnnotationClass = getClass("scala.ClassfileAnnotation")
- lazy val StaticAnnotationClass = getClass("scala.StaticAnnotation")
+ lazy val AnnotationClass = getClass("scala.annotation.Annotation")
+ lazy val ClassfileAnnotationClass = getClass("scala.annotation.ClassfileAnnotation")
+ lazy val StaticAnnotationClass = getClass("scala.annotation.StaticAnnotation")
lazy val uncheckedStableClass = getClass("scala.annotation.unchecked.uncheckedStable")
lazy val uncheckedVarianceClass = getClass("scala.annotation.unchecked.uncheckedVariance")
lazy val UncheckedClass = getClass("scala.unchecked")
@@ -179,7 +179,7 @@ trait Definitions extends reflect.generic.StandardDefinitions {
def delayedInitArgVal = EmptyPackageClass.newValue(NoPosition, nme.delayedInitArg)
.setInfo(UnitClass.tpe)
- lazy val TypeConstraintClass = getClass("scala.TypeConstraint")
+ lazy val TypeConstraintClass = getClass("scala.annotation.TypeConstraint")
lazy val SingletonClass = newClass(ScalaPackageClass, tpnme.Singleton, anyparam) setFlag (ABSTRACT | TRAIT | FINAL)
lazy val SerializableClass = getClass("scala.Serializable")
lazy val JavaSerializableClass = getClass(sn.JavaSerializable)
@@ -827,19 +827,19 @@ trait Definitions extends reflect.generic.StandardDefinitions {
* so for now they're mothballed.
*/
// def getModule2(name1: Name, name2: Name) = {
- // try getModuleOrClass(name1, true)
+ // try getModuleOrClass(name1.toTermName)
// catch { case ex1: FatalError =>
- // try getModuleOrClass(name2, true)
+ // try getModuleOrClass(name2.toTermName)
// catch { case ex2: FatalError => throw ex1 }
// }
// }
// def getClass2(name1: Name, name2: Name) = {
// try {
- // val result = getModuleOrClass(name1, false)
+ // val result = getModuleOrClass(name1.toTypeName)
// if (result.isAliasType) getClass(name2) else result
// }
// catch { case ex1: FatalError =>
- // try getModuleOrClass(name2, false)
+ // try getModuleOrClass(name2.toTypeName)
// catch { case ex2: FatalError => throw ex1 }
// }
// }
diff --git a/src/continuations/library/scala/util/continuations/ControlContext.scala b/src/continuations/library/scala/util/continuations/ControlContext.scala
index a97b8c8279..6d7766f173 100644
--- a/src/continuations/library/scala/util/continuations/ControlContext.scala
+++ b/src/continuations/library/scala/util/continuations/ControlContext.scala
@@ -3,13 +3,13 @@
package scala.util.continuations
-class cpsParam[-B,+C] extends StaticAnnotation with TypeConstraint
+class cpsParam[-B,+C] extends annotation.StaticAnnotation with TypeConstraint
private class cpsSym[B] extends Annotation // implementation detail
private class cpsSynth extends Annotation // implementation detail
-private class cpsPlus extends StaticAnnotation with TypeConstraint // implementation detail
+private class cpsPlus extends annotation.StaticAnnotation with TypeConstraint // implementation detail
private class cpsMinus extends Annotation // implementation detail
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala
index 700b5bfbac..8881cd1fbe 100644
--- a/src/library/scala/Predef.scala
+++ b/src/library/scala/Predef.scala
@@ -56,7 +56,7 @@ object Predef extends LowPriorityImplicits {
def implicitly[T](implicit e: T) = e // for summoning implicit values from the nether world
@inline def locally[T](x: T): T = x // to communicate intent and avoid unmoored statements
- // errors and asserts -------------------------------------------------
+ // Deprecated
@deprecated("Use system.error(message) instead")
def error(message: String): Nothing = system.error(message)
@@ -67,6 +67,11 @@ object Predef extends LowPriorityImplicits {
@deprecated("Use system.exit(status) instead")
def exit(status: Int): Nothing = system.exit(status)
+ @deprecated("Use formatString.format(args: _*) or arg.formatted(formatString) instead")
+ def format(text: String, xs: Any*) = augmentString(text).format(xs: _*)
+
+ // errors and asserts -------------------------------------------------
+
/** Tests an expression, throwing an AssertionError if false.
* Calls to this method will not be generated if -Xelide-below
* is at least ASSERTION.
@@ -183,9 +188,6 @@ object Predef extends LowPriorityImplicits {
def println(x: Any) = Console.println(x)
def printf(text: String, xs: Any*) = Console.print(text.format(xs: _*))
- @deprecated("Use formatString.format(args: _*) or arg.formatted(formatString) instead")
- def format(text: String, xs: Any*) = augmentString(text).format(xs: _*)
-
def readLine(): String = Console.readLine()
def readLine(text: String, args: Any*) = Console.readLine(text, args)
def readBoolean() = Console.readBoolean()
diff --git a/src/library/scala/SerialVersionUID.scala b/src/library/scala/SerialVersionUID.scala
index 0a2e29c934..ae1d377646 100644
--- a/src/library/scala/SerialVersionUID.scala
+++ b/src/library/scala/SerialVersionUID.scala
@@ -15,4 +15,4 @@ package scala
* Annotation for specifying the <code>static SerialVersionUID</code> field
* of a serializable class.
*/
-class SerialVersionUID(uid: Long) extends StaticAnnotation
+class SerialVersionUID(uid: Long) extends annotation.StaticAnnotation
diff --git a/src/library/scala/Annotation.scala b/src/library/scala/annotation/Annotation.scala
index 8c75e15a79..06e3fb3b4f 100644
--- a/src/library/scala/Annotation.scala
+++ b/src/library/scala/annotation/Annotation.scala
@@ -6,9 +6,7 @@
** |/ **
\* */
-
-
-package scala
+package scala.annotation
/** <p>
* A base class for annotations. Annotations extending this class directly
diff --git a/src/library/scala/ClassfileAnnotation.scala b/src/library/scala/annotation/ClassfileAnnotation.scala
index b762d71a97..aca9d2d13f 100644
--- a/src/library/scala/ClassfileAnnotation.scala
+++ b/src/library/scala/annotation/ClassfileAnnotation.scala
@@ -6,9 +6,7 @@
** |/ **
\* */
-
-
-package scala
+package scala.annotation
/** <p>
* A base class for classfile annotations. These are stored as
diff --git a/src/library/scala/StaticAnnotation.scala b/src/library/scala/annotation/StaticAnnotation.scala
index a1c3828173..1bbeaf6a5d 100644
--- a/src/library/scala/StaticAnnotation.scala
+++ b/src/library/scala/annotation/StaticAnnotation.scala
@@ -6,9 +6,7 @@
** |/ **
\* */
-
-
-package scala
+package scala.annotation
/** <p>
* A base class for static annotations. These are available
@@ -19,4 +17,4 @@ package scala
* @version 1.1, 2/02/2007
* @since 2.4
*/
-trait StaticAnnotation extends Annotation {}
+trait StaticAnnotation extends Annotation
diff --git a/src/library/scala/TypeConstraint.scala b/src/library/scala/annotation/TypeConstraint.scala
index 1cb7e55823..2cd8be210f 100644
--- a/src/library/scala/TypeConstraint.scala
+++ b/src/library/scala/annotation/TypeConstraint.scala
@@ -6,9 +6,7 @@
** |/ **
\* */
-
-
-package scala
+package scala.annotation
/** <p>
* A marker for annotations that, when applied to a type,
diff --git a/src/library/scala/annotation/elidable.scala b/src/library/scala/annotation/elidable.scala
index c75299e9fd..1767e044fe 100644
--- a/src/library/scala/annotation/elidable.scala
+++ b/src/library/scala/annotation/elidable.scala
@@ -27,7 +27,7 @@ import java.util.logging.Level
* }}}
* @since 2.8
*/
-final class elidable(final val level: Int) extends StaticAnnotation {}
+final class elidable(final val level: Int) extends annotation.StaticAnnotation {}
/** This useless appearing code was necessary to allow people to use
* named constants for the elidable annotation. This is what it takes
diff --git a/src/library/scala/annotation/implicitNotFound.scala b/src/library/scala/annotation/implicitNotFound.scala
index 5d9b29c5f8..ffc9bce83a 100644
--- a/src/library/scala/annotation/implicitNotFound.scala
+++ b/src/library/scala/annotation/implicitNotFound.scala
@@ -15,4 +15,4 @@ package scala.annotation
* @author Adriaan Moors
* @since 2.8.1
*/
-final class implicitNotFound(msg: String) extends StaticAnnotation {} \ No newline at end of file
+final class implicitNotFound(msg: String) extends annotation.StaticAnnotation {} \ No newline at end of file
diff --git a/src/library/scala/annotation/migration.scala b/src/library/scala/annotation/migration.scala
index b0915cde34..8a5222f481 100644
--- a/src/library/scala/annotation/migration.scala
+++ b/src/library/scala/annotation/migration.scala
@@ -25,4 +25,4 @@ private[scala] final class migration(
majorVersion: Int,
minorVersion: Int,
message: String)
-extends StaticAnnotation {}
+extends annotation.StaticAnnotation {}
diff --git a/src/library/scala/annotation/serializable.scala b/src/library/scala/annotation/serializable.scala
index 1364d7dcce..49d4c50e6d 100644
--- a/src/library/scala/annotation/serializable.scala
+++ b/src/library/scala/annotation/serializable.scala
@@ -12,4 +12,4 @@ package scala.annotation
* An annotation that designates the class to which it is applied as serializable
*/
@deprecated("instead of `@serializable class C`, use `class C extends Serializable`")
-class serializable extends StaticAnnotation
+class serializable extends annotation.StaticAnnotation
diff --git a/src/library/scala/annotation/strictfp.scala b/src/library/scala/annotation/strictfp.scala
index b6852c69ef..4fa19f0de0 100644
--- a/src/library/scala/annotation/strictfp.scala
+++ b/src/library/scala/annotation/strictfp.scala
@@ -15,4 +15,4 @@ package scala.annotation
* @version 2.9
* @since 2.9
*/
-class strictfp extends StaticAnnotation
+class strictfp extends annotation.StaticAnnotation
diff --git a/src/library/scala/annotation/switch.scala b/src/library/scala/annotation/switch.scala
index a34436f503..4e6e1f5571 100644
--- a/src/library/scala/annotation/switch.scala
+++ b/src/library/scala/annotation/switch.scala
@@ -35,4 +35,4 @@ package scala.annotation
*
* @since 2.8
*/
-final class switch extends StaticAnnotation
+final class switch extends annotation.StaticAnnotation
diff --git a/src/library/scala/annotation/tailrec.scala b/src/library/scala/annotation/tailrec.scala
index 5e59c9fbf8..32f6f587e1 100644
--- a/src/library/scala/annotation/tailrec.scala
+++ b/src/library/scala/annotation/tailrec.scala
@@ -15,4 +15,4 @@ package scala.annotation
*
* @since 2.8
*/
-final class tailrec extends StaticAnnotation
+final class tailrec extends annotation.StaticAnnotation
diff --git a/src/library/scala/annotation/target/beanGetter.scala b/src/library/scala/annotation/target/beanGetter.scala
index e815e697ad..699f8ced4e 100644
--- a/src/library/scala/annotation/target/beanGetter.scala
+++ b/src/library/scala/annotation/target/beanGetter.scala
@@ -48,4 +48,4 @@ package scala.annotation.target
* class myAnnotation extends Annotation
* }}}
*/
-final class beanGetter extends StaticAnnotation
+final class beanGetter extends annotation.StaticAnnotation
diff --git a/src/library/scala/annotation/target/beanSetter.scala b/src/library/scala/annotation/target/beanSetter.scala
index d7199694e5..6f4887aa0c 100644
--- a/src/library/scala/annotation/target/beanSetter.scala
+++ b/src/library/scala/annotation/target/beanSetter.scala
@@ -48,4 +48,4 @@ package scala.annotation.target
* class myAnnotation extends Annotation
* }}}
*/
-final class beanSetter extends StaticAnnotation
+final class beanSetter extends annotation.StaticAnnotation
diff --git a/src/library/scala/annotation/target/field.scala b/src/library/scala/annotation/target/field.scala
index 94e82bcbe2..71b09c27e6 100644
--- a/src/library/scala/annotation/target/field.scala
+++ b/src/library/scala/annotation/target/field.scala
@@ -48,4 +48,4 @@ package scala.annotation.target
* class myAnnotation extends Annotation
* }}}
*/
-final class field extends StaticAnnotation
+final class field extends annotation.StaticAnnotation
diff --git a/src/library/scala/annotation/target/getter.scala b/src/library/scala/annotation/target/getter.scala
index 2d5e856173..10266a0430 100644
--- a/src/library/scala/annotation/target/getter.scala
+++ b/src/library/scala/annotation/target/getter.scala
@@ -48,4 +48,4 @@ package scala.annotation.target
* class myAnnotation extends Annotation
* }}}
*/
-final class getter extends StaticAnnotation
+final class getter extends annotation.StaticAnnotation
diff --git a/src/library/scala/annotation/target/param.scala b/src/library/scala/annotation/target/param.scala
index 317080f2cb..e310178c83 100644
--- a/src/library/scala/annotation/target/param.scala
+++ b/src/library/scala/annotation/target/param.scala
@@ -48,4 +48,4 @@ package scala.annotation.target
* class myAnnotation extends Annotation
* }}}
*/
-final class param extends StaticAnnotation
+final class param extends annotation.StaticAnnotation
diff --git a/src/library/scala/annotation/target/setter.scala b/src/library/scala/annotation/target/setter.scala
index 4e0758b6eb..e7884de263 100644
--- a/src/library/scala/annotation/target/setter.scala
+++ b/src/library/scala/annotation/target/setter.scala
@@ -48,4 +48,4 @@ package scala.annotation.target
* class myAnnotation extends Annotation
* }}}
*/
-final class setter extends StaticAnnotation
+final class setter extends annotation.StaticAnnotation
diff --git a/src/library/scala/annotation/unchecked/uncheckedStable.scala b/src/library/scala/annotation/unchecked/uncheckedStable.scala
index a778f45147..7a69c247f9 100644
--- a/src/library/scala/annotation/unchecked/uncheckedStable.scala
+++ b/src/library/scala/annotation/unchecked/uncheckedStable.scala
@@ -12,4 +12,4 @@ package scala.annotation.unchecked
*
* @since 2.7
*/
-final class uncheckedStable extends StaticAnnotation {}
+final class uncheckedStable extends annotation.StaticAnnotation {}
diff --git a/src/library/scala/annotation/unchecked/uncheckedVariance.scala b/src/library/scala/annotation/unchecked/uncheckedVariance.scala
index 52f4fb5cc0..81432e05ad 100644
--- a/src/library/scala/annotation/unchecked/uncheckedVariance.scala
+++ b/src/library/scala/annotation/unchecked/uncheckedVariance.scala
@@ -12,4 +12,4 @@ package scala.annotation.unchecked
*
* @since 2.7
*/
-final class uncheckedVariance extends StaticAnnotation {}
+final class uncheckedVariance extends annotation.StaticAnnotation {}
diff --git a/src/library/scala/annotation/varargs.scala b/src/library/scala/annotation/varargs.scala
index ad6a3f9bd4..e4b4c09840 100644
--- a/src/library/scala/annotation/varargs.scala
+++ b/src/library/scala/annotation/varargs.scala
@@ -15,4 +15,4 @@ package scala.annotation
*
* @since 2.9
*/
-final class varargs extends StaticAnnotation
+final class varargs extends annotation.StaticAnnotation
diff --git a/src/library/scala/cloneable.scala b/src/library/scala/cloneable.scala
index 9becd3f231..e2c4978380 100644
--- a/src/library/scala/cloneable.scala
+++ b/src/library/scala/cloneable.scala
@@ -13,4 +13,4 @@ package scala
/**
* An annotation that designates the class to which it is applied as cloneable
*/
-class cloneable extends StaticAnnotation
+class cloneable extends annotation.StaticAnnotation
diff --git a/src/library/scala/deprecated.scala b/src/library/scala/deprecated.scala
index 50a6601d00..9a9be1eac3 100644
--- a/src/library/scala/deprecated.scala
+++ b/src/library/scala/deprecated.scala
@@ -19,6 +19,6 @@ import annotation.target._
* @since 2.3
*/
@getter @setter @beanGetter @beanSetter
-class deprecated(message: String) extends StaticAnnotation {
+class deprecated(message: String) extends annotation.StaticAnnotation {
def this() = this("")
}
diff --git a/src/library/scala/deprecatedName.scala b/src/library/scala/deprecatedName.scala
index 30d0ae457a..e91ce6e8f4 100644
--- a/src/library/scala/deprecatedName.scala
+++ b/src/library/scala/deprecatedName.scala
@@ -10,4 +10,4 @@ import annotation.target._
* @since 2.8.1
*/
@param
-class deprecatedName(name: Symbol) extends StaticAnnotation
+class deprecatedName(name: Symbol) extends annotation.StaticAnnotation
diff --git a/src/library/scala/inline.scala b/src/library/scala/inline.scala
index 1e91be2b17..06b7ef10b5 100644
--- a/src/library/scala/inline.scala
+++ b/src/library/scala/inline.scala
@@ -17,4 +17,4 @@ package scala
* @author Lex Spoon
* @version 1.0, 2007-5-21
*/
-class inline extends StaticAnnotation
+class inline extends annotation.StaticAnnotation
diff --git a/src/library/scala/native.scala b/src/library/scala/native.scala
index 8f5f3e8319..71f5bbd74e 100644
--- a/src/library/scala/native.scala
+++ b/src/library/scala/native.scala
@@ -20,4 +20,4 @@ package scala
* but it is type checked when present.
*
* @since 2.6 */
-class native extends StaticAnnotation {}
+class native extends annotation.StaticAnnotation {}
diff --git a/src/library/scala/noinline.scala b/src/library/scala/noinline.scala
index 18270e7bc5..2a21ae30ba 100644
--- a/src/library/scala/noinline.scala
+++ b/src/library/scala/noinline.scala
@@ -18,4 +18,4 @@ package scala
* @version 1.0, 2007-5-21
* @since 2.5
*/
-class noinline extends StaticAnnotation
+class noinline extends annotation.StaticAnnotation
diff --git a/src/library/scala/package.scala b/src/library/scala/package.scala
index 2a30ce5061..74a2a7030e 100644
--- a/src/library/scala/package.scala
+++ b/src/library/scala/package.scala
@@ -166,9 +166,9 @@ package object scala {
@deprecated("Use ((x1, x2, ...)) syntax to create Tuples")
def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12, x13: A13, x14: A14, x15: A15, x16: A16, x17: A17, x18: A18, x19: A19, x20: A20, x21: A21, x22: A22) = Tuple22(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22)
- @deprecated("use <code>java.lang.Integer</code> instead")
+ @deprecated("use java.lang.Integer instead")
type Integer = java.lang.Integer
- @deprecated("use <code>java.lang.Character</code> instead")
+ @deprecated("use java.lang.Character instead")
type Character = java.lang.Character
@deprecated("use Iterable instead") type Collection[+A] = Iterable[A]
@@ -179,10 +179,9 @@ package object scala {
@deprecated("use IndexedSeq instead") type RandomAccessSeq[+A] = scala.collection.IndexedSeq[A]
@deprecated("use IndexedSeq instead") val RandomAccessSeq = scala.collection.IndexedSeq
-/* the following classes should be moved to annotation and the aliases should be enabled
- @deprecated("use annotation.Annotation instead") type Annotation = annotation.Annotation
- @deprecated("use annotation.ClassfileAnnotation instead") type ClassfileAnnotation = annotation.Annotation
- @deprecated("use annotation.StaticAnnotation instead") type StaticAnnotation = annotation.Annotation
- @deprecated("use annotation.TypeConstraint instead") type TypeConstraint = annotation.TypeConstraint
-*/
+
+ @deprecated("use scala.annotation.Annotation instead") type Annotation = scala.annotation.Annotation
+ @deprecated("use scala.annotation.ClassfileAnnotation instead") type ClassfileAnnotation = scala.annotation.ClassfileAnnotation
+ @deprecated("use scala.annotation.StaticAnnotation instead") type StaticAnnotation = scala.annotation.StaticAnnotation
+ @deprecated("use scala.annotation.TypeConstraint instead") type TypeConstraint = scala.annotation.TypeConstraint
}
diff --git a/src/library/scala/reflect/BeanProperty.scala b/src/library/scala/reflect/BeanProperty.scala
index d784774882..5ae19602ea 100644
--- a/src/library/scala/reflect/BeanProperty.scala
+++ b/src/library/scala/reflect/BeanProperty.scala
@@ -31,4 +31,4 @@ import annotation.target._
* </p>
*/
@field
-class BeanProperty extends StaticAnnotation
+class BeanProperty extends annotation.StaticAnnotation
diff --git a/src/library/scala/reflect/BooleanBeanProperty.scala b/src/library/scala/reflect/BooleanBeanProperty.scala
index f90f11f7cb..d606f24991 100644
--- a/src/library/scala/reflect/BooleanBeanProperty.scala
+++ b/src/library/scala/reflect/BooleanBeanProperty.scala
@@ -20,4 +20,4 @@ import annotation.target._
* </p>
*/
@field
-class BooleanBeanProperty extends StaticAnnotation
+class BooleanBeanProperty extends annotation.StaticAnnotation
diff --git a/src/library/scala/remote.scala b/src/library/scala/remote.scala
index bcbc597338..38d9c5b7b3 100644
--- a/src/library/scala/remote.scala
+++ b/src/library/scala/remote.scala
@@ -13,4 +13,4 @@ package scala
/**
* An annotation that designates the class to which it is applied as remotable.
*/
-class remote extends StaticAnnotation {}
+class remote extends annotation.StaticAnnotation {}
diff --git a/src/library/scala/specialized.scala b/src/library/scala/specialized.scala
index f4ce207c4b..aba65bb044 100644
--- a/src/library/scala/specialized.scala
+++ b/src/library/scala/specialized.scala
@@ -25,7 +25,7 @@ package scala
*
* @since 2.8
*/
-class specialized(types: runtime.AnyValCompanion*) extends StaticAnnotation {
+class specialized(types: runtime.AnyValCompanion*) extends annotation.StaticAnnotation {
def this() {
this(Unit, Boolean, Byte, Short, Char, Int, Long, Float, Double)
}
diff --git a/src/library/scala/throws.scala b/src/library/scala/throws.scala
index 62dfc8fc96..670384cc6f 100644
--- a/src/library/scala/throws.scala
+++ b/src/library/scala/throws.scala
@@ -25,4 +25,4 @@ package scala
* @version 1.0, 19/05/2006
* @since 2.1
*/
-class throws(clazz: Class[_]) extends StaticAnnotation
+class throws(clazz: Class[_]) extends annotation.StaticAnnotation
diff --git a/src/library/scala/transient.scala b/src/library/scala/transient.scala
index 12aa15fd1f..4358c196c6 100644
--- a/src/library/scala/transient.scala
+++ b/src/library/scala/transient.scala
@@ -13,4 +13,4 @@ package scala
import annotation.target._
@field
-class transient extends StaticAnnotation
+class transient extends annotation.StaticAnnotation
diff --git a/src/library/scala/volatile.scala b/src/library/scala/volatile.scala
index 7c9d9726bd..ad408a0235 100644
--- a/src/library/scala/volatile.scala
+++ b/src/library/scala/volatile.scala
@@ -13,4 +13,4 @@ package scala
import annotation.target._
@field
-class volatile extends StaticAnnotation
+class volatile extends annotation.StaticAnnotation
diff --git a/test/files/neg/bug935.check b/test/files/neg/bug935.check
index 63b267964b..6a4129eee3 100644
--- a/test/files/neg/bug935.check
+++ b/test/files/neg/bug935.check
@@ -1,7 +1,7 @@
-bug935.scala:5: error: type arguments [Test3.B] do not conform to class E's type parameter bounds [T <: String]
+bug935.scala:7: error: type arguments [Test3.B] do not conform to class E's type parameter bounds [T <: String]
@E[B](new B) val b = "hi"
^
-bug935.scala:11: error: type arguments [Test4.B] do not conform to class E's type parameter bounds [T <: String]
+bug935.scala:13: error: type arguments [Test4.B] do not conform to class E's type parameter bounds [T <: String]
val b: String @E[B](new B) = "hi"
^
two errors found
diff --git a/test/files/neg/bug935.scala b/test/files/neg/bug935.scala
index 8677efaf3f..299062adb8 100644
--- a/test/files/neg/bug935.scala
+++ b/test/files/neg/bug935.scala
@@ -1,3 +1,5 @@
+import annotation.Annotation
+
object Test3 {
class E[T >: Nothing <: String](s: T) extends Annotation
class B
diff --git a/test/files/run/constrained-types.check b/test/files/run/constrained-types.check
index dbad841d99..dd21cf0c4e 100644
--- a/test/files/run/constrained-types.check
+++ b/test/files/run/constrained-types.check
@@ -1,4 +1,4 @@
-class Annot(obj: Any) extends Annotation with TypeConstraint
+class Annot(obj: Any) extends annotation.Annotation with annotation.TypeConstraint
defined class Annot
-----
@@ -80,7 +80,7 @@ val stuff = m("stuff") // should not crash
stuff: String @Annot("stuff") = stuff
-----
-class peer extends Annotation // should not crash
+class peer extends annotation.Annotation // should not crash
defined class peer
-----
@@ -108,7 +108,7 @@ def n(y: String) = {
n: (y: String)java.lang.String @Annot(x) forSome { val x: String }
-----
-class rep extends Annotation
+class rep extends annotation.Annotation
defined class rep
-----
@@ -126,7 +126,7 @@ val x = 3 : Int @Annot(e+f+g+h) //should have a graceful error message
^
-----
-class Where(condition: Boolean) extends Annotation
+class Where(condition: Boolean) extends annotation.Annotation
defined class Where
-----
diff --git a/test/files/run/constrained-types.scala b/test/files/run/constrained-types.scala
index 62abfe9e31..86fcaade6e 100644
--- a/test/files/run/constrained-types.scala
+++ b/test/files/run/constrained-types.scala
@@ -10,7 +10,7 @@ import scala.Console
object Test {
val testCode = List(
- "class Annot(obj: Any) extends Annotation with TypeConstraint",
+ "class Annot(obj: Any) extends annotation.Annotation with annotation.TypeConstraint",
"""class A {
| val x = "hello"
@@ -54,7 +54,7 @@ object Test {
"""val stuff = m("stuff") // should not crash""",
- """class peer extends Annotation // should not crash""", // reported by Manfred Stock
+ """class peer extends annotation.Annotation // should not crash""", // reported by Manfred Stock
"""class NPE[T <: NPE[T] @peer] // should not crash""", // reported by Manfred Stock
"""def m = {
@@ -73,13 +73,13 @@ object Test {
| m("stuff".stripMargin)
|} // x should be existentially bound""",
- "class rep extends Annotation",
+ "class rep extends annotation.Annotation",
"""object A { val x = "hello" : String @ rep }""",
"val y = a.x // should drop the annotation",
"val x = 3 : Int @Annot(e+f+g+h) //should have a graceful error message",
- "class Where(condition: Boolean) extends Annotation",
+ "class Where(condition: Boolean) extends annotation.Annotation",
"val x : Int @Where(self > 0 && self < 100) = 3"
).map(_.stripMargin)