diff options
author | Paul Phillips <paulp@improving.org> | 2009-02-23 13:36:19 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-02-23 13:36:19 +0000 |
commit | ef13a9d40b2b62d73d8caabca576e1d2667ea83d (patch) | |
tree | c1e09697d438239a1e2a06e74483b2000088b007 /test/files/neg | |
parent | a187f432f712734d00504e8250955272220eb418 (diff) | |
download | scala-ef13a9d40b2b62d73d8caabca576e1d2667ea83d.tar.gz scala-ef13a9d40b2b62d73d8caabca576e1d2667ea83d.tar.bz2 scala-ef13a9d40b2b62d73d8caabca576e1d2667ea83d.zip |
Fix and test case for #935; added test in RefCh...
Fix and test case for #935; added test in RefChecks to confirm that
parameterized annotations conform to type bounds.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/bug935.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug935.scala | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/files/neg/bug935.check b/test/files/neg/bug935.check new file mode 100644 index 0000000000..e2c2b87be8 --- /dev/null +++ b/test/files/neg/bug935.check @@ -0,0 +1,4 @@ +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 diff --git a/test/files/neg/bug935.scala b/test/files/neg/bug935.scala new file mode 100644 index 0000000000..4497e0812e --- /dev/null +++ b/test/files/neg/bug935.scala @@ -0,0 +1,6 @@ +object Test3 { + class E[T >: Nothing <: String](s: T) extends Annotation + class B + // val a = new E[B](new B) + @E[B](new B) val b = "hi" +}
\ No newline at end of file |