From 8922c4ed092a2fb4c3f6002f7c49d304f299cd02 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 6 Dec 2010 04:04:56 +0000 Subject: 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. --- test/files/neg/bug935.check | 4 ++-- test/files/neg/bug935.scala | 2 ++ test/files/run/constrained-types.check | 8 ++++---- test/files/run/constrained-types.scala | 8 ++++---- 4 files changed, 12 insertions(+), 10 deletions(-) (limited to 'test/files') 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) -- cgit v1.2.3