From 422f461578ae0547181afe6d2c0c52ea1071d37b Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 22 Dec 2012 08:13:48 -0800 Subject: Shored up a hidden dealiasing dependency. Like the comment says: // This way typedNew always returns a dealiased type. This // used to happen by accident for instantiations without type // arguments due to ad hoc code in typedTypeConstructor, and // annotations depended on it (to the extent that they worked, // which they did not when given a parameterized type alias // which dealiased to an annotation.) typedTypeConstructor // dealiases nothing now, but it makes sense for a "new" to // always be given a dealiased type. PS: Simply running the test suite is becoming more difficult all the time. Running "ant test" includes time consuming activities of niche interest such as all the osgi tests, but test.suite manages to miss the continuations tests. --- test/files/continuations-neg/function2.check | 2 +- test/files/continuations-neg/t5314-type-error.check | 4 ++-- test/files/jvm/annotations.check | 15 +++++++++++++++ test/files/jvm/annotations.scala | 6 ++++++ 4 files changed, 24 insertions(+), 3 deletions(-) (limited to 'test/files') diff --git a/test/files/continuations-neg/function2.check b/test/files/continuations-neg/function2.check index 82b81c1444..4b1a6227bc 100644 --- a/test/files/continuations-neg/function2.check +++ b/test/files/continuations-neg/function2.check @@ -1,6 +1,6 @@ function2.scala:11: error: type mismatch; found : () => Int - required: () => Int @util.continuations.cps[Int] + required: () => Int @scala.util.continuations.cpsParam[Int,Int] val g: () => Int @cps[Int] = f ^ one error found diff --git a/test/files/continuations-neg/t5314-type-error.check b/test/files/continuations-neg/t5314-type-error.check index 1f4e46a7f2..e66c9d833f 100644 --- a/test/files/continuations-neg/t5314-type-error.check +++ b/test/files/continuations-neg/t5314-type-error.check @@ -1,6 +1,6 @@ t5314-type-error.scala:7: error: type mismatch; - found : Int @util.continuations.cps[Int] - required: Int @util.continuations.cps[String] + found : Int @scala.util.continuations.cpsParam[Int,Int] + required: Int @scala.util.continuations.cpsParam[String,String] def bar(x:Int): Int @cps[String] = return foo(x) ^ one error found diff --git a/test/files/jvm/annotations.check b/test/files/jvm/annotations.check index 8a4d58d56c..a8dc5ecdd1 100644 --- a/test/files/jvm/annotations.check +++ b/test/files/jvm/annotations.check @@ -28,6 +28,21 @@ public Test4$Foo8(int) @test.SourceAnnotation(mails={bill.gates@bloodsuckers.com}, value=http://eppli.com) private int Test4$Foo9.z +@test.SourceAnnotation(mails={bill.gates@bloodsuckers.com}, value=http://eppli.com) +private int Test4$Foo9.z2 + +@test.SourceAnnotation(mails={bill.gates@bloodsuckers.com}, value=http://eppli.com) +private int Test4$Foo9.z3 + +@test.SourceAnnotation(mails={bill.gates@bloodsuckers.com}, value=http://eppli.com) +public int Test4$Foo9.getZ() + +@test.SourceAnnotation(mails={bill.gates@bloodsuckers.com}, value=http://eppli.com) +public int Test4$Foo9.getZ2() + +@test.SourceAnnotation(mails={bill.gates@bloodsuckers.com}, value=http://eppli.com) +public int Test4$Foo9.getZ3() + @test.SourceAnnotation(mails={bill.gates@bloodsuckers.com}, value=http://apple.com) public int Test4$Foo9.x() diff --git a/test/files/jvm/annotations.scala b/test/files/jvm/annotations.scala index 66ebde592b..77a45fae89 100644 --- a/test/files/jvm/annotations.scala +++ b/test/files/jvm/annotations.scala @@ -101,6 +101,12 @@ object Test4 { type myAnn = SourceAnnotation @beanGetter @field @BeanProperty @myAnn("http://eppli.com") var z = 0 + + type myAnn2[T] = SourceAnnotation @beanGetter @field + @BeanProperty @myAnn2[String]("http://eppli.com") var z2 = 0 + + type myAnn3[CC[_]] = SourceAnnotation @beanGetter @field + @BeanProperty @myAnn3[List]("http://eppli.com") var z3 = 0 } class Foo10(@SourceAnnotation("on param 1") val name: String) class Foo11(@(SourceAnnotation @scala.annotation.meta.field)("on param 2") val name: String) -- cgit v1.2.3