diff options
author | Paul Phillips <paulp@improving.org> | 2009-02-23 15:09:27 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-02-23 15:09:27 +0000 |
commit | c4c651969c1c72a38c7bbd33c2cad2bc7a1f65cb (patch) | |
tree | 02b0f042ae4d2e2f67b727e12ccbf42328d143f3 /test/files | |
parent | 68e4cac5aed2c6f8cbdf6bc06e0dae75c709c614 (diff) | |
download | scala-c4c651969c1c72a38c7bbd33c2cad2bc7a1f65cb.tar.gz scala-c4c651969c1c72a38c7bbd33c2cad2bc7a1f65cb.tar.bz2 scala-c4c651969c1c72a38c7bbd33c2cad2bc7a1f65cb.zip |
Continuation of r17177 to also check type annot...
Continuation of r17177 to also check type annotations; test case
broadened accordingly.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/bug935.check | 5 | ||||
-rw-r--r-- | test/files/neg/bug935.scala | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/test/files/neg/bug935.check b/test/files/neg/bug935.check index e2c2b87be8..505b82ea15 100644 --- a/test/files/neg/bug935.check +++ b/test/files/neg/bug935.check @@ -1,4 +1,7 @@ bug935.scala:5: error: type arguments [Test3.B] do not conform to class E's type parameter bounds [T <: String] @E[B](new B) val b = "hi" ^ -one error found +bug935.scala:11: 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 4497e0812e..20654a3f56 100644 --- a/test/files/neg/bug935.scala +++ b/test/files/neg/bug935.scala @@ -3,4 +3,10 @@ object Test3 { class B // val a = new E[B](new B) @E[B](new B) val b = "hi" +} + +object Test4 { + class E[T <: String](s: T) extends Annotation + class B + val b: String @E[B](new B) = "hi" }
\ No newline at end of file |