aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/pending/pos/annot.scala5
-rw-r--r--tests/pos/annot-bootstrap.scala8
-rw-r--r--tests/pos/annot.scala6
-rw-r--r--tests/pos/i0306.scala17
4 files changed, 28 insertions, 8 deletions
diff --git a/tests/pending/pos/annot.scala b/tests/pending/pos/annot.scala
deleted file mode 100644
index 8e21803b4..000000000
--- a/tests/pending/pos/annot.scala
+++ /dev/null
@@ -1,5 +0,0 @@
-class Test {
-
- @SuppressWarnings("hi") def foo() = ???
-
-}
diff --git a/tests/pos/annot-bootstrap.scala b/tests/pos/annot-bootstrap.scala
new file mode 100644
index 000000000..bef877dcd
--- /dev/null
+++ b/tests/pos/annot-bootstrap.scala
@@ -0,0 +1,8 @@
+package scala.annotation.unchecked
+
+// note: if the case class is not inside an object, the error disappears
+object test {
+ case class L(a: Int)
+}
+
+final class uncheckedVariance extends scala.annotation.StaticAnnotation {}
diff --git a/tests/pos/annot.scala b/tests/pos/annot.scala
index ab80aba27..c3a17ff1d 100644
--- a/tests/pos/annot.scala
+++ b/tests/pos/annot.scala
@@ -2,11 +2,11 @@ import java.beans.Transient
class Test {
- @SuppressWarnings(Array("hi")) def foo() = ??? // evalutation of annotation on type cannot be deffered as requires implicit resolution(only generic Array$.apply applies here)
+ @SuppressWarnings(Array("hi")) def foo() = ??? // evalutation of annotation on type cannot be deferred as requires implicit resolution(only generic Array$.apply applies here)
- @SuppressWarnings(Array("hi", "foo")) def foo2() = ??? //can be deffered as there is a non-generic method
+ @SuppressWarnings(Array("hi", "foo")) def foo2() = ??? //can be deferred as there is a non-generic method
-// @SuppressWarnings("hi") def foo3() = ??? // can be written in java and is serialized this way in bytecode. doesn't typecheck
+ @SuppressWarnings("hi") def foo3() = ??? // can be written in java and is serialized this way in bytecode. doesn't typecheck
@Transient(false) def bar = ???
diff --git a/tests/pos/i0306.scala b/tests/pos/i0306.scala
new file mode 100644
index 000000000..5a242fa83
--- /dev/null
+++ b/tests/pos/i0306.scala
@@ -0,0 +1,17 @@
+object bar {
+
+ class C[T <: Seq[_]]
+
+ val x: AnyRef = new C
+
+ val y = x match {
+ case x: C[u] =>
+ def xx: u = xx
+ xx
+ }
+
+ val z= {
+ def xx: String = xx
+ xx
+ }
+}