diff options
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t3936/BlockingQueue.java | 3 | ||||
-rw-r--r-- | test/files/pos/t3936/Queue.java | 2 | ||||
-rw-r--r-- | test/files/pos/t3936/Test.scala | 4 | ||||
-rw-r--r-- | test/files/pos/t7433.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t7433.scala | 10 | ||||
-rw-r--r-- | test/files/pos/t7584.scala | 11 |
6 files changed, 31 insertions, 0 deletions
diff --git a/test/files/pos/t3936/BlockingQueue.java b/test/files/pos/t3936/BlockingQueue.java new file mode 100644 index 0000000000..b902d4528d --- /dev/null +++ b/test/files/pos/t3936/BlockingQueue.java @@ -0,0 +1,3 @@ +package pack; +import java.util.Queue; +public interface BlockingQueue<E> extends Queue<E> { } diff --git a/test/files/pos/t3936/Queue.java b/test/files/pos/t3936/Queue.java new file mode 100644 index 0000000000..25c9087601 --- /dev/null +++ b/test/files/pos/t3936/Queue.java @@ -0,0 +1,2 @@ +package pack; +public interface Queue { } diff --git a/test/files/pos/t3936/Test.scala b/test/files/pos/t3936/Test.scala new file mode 100644 index 0000000000..c867a05ec9 --- /dev/null +++ b/test/files/pos/t3936/Test.scala @@ -0,0 +1,4 @@ +package pack +trait Test { + val b: BlockingQueue[Nothing] +} diff --git a/test/files/pos/t7433.flags b/test/files/pos/t7433.flags new file mode 100644 index 0000000000..e8fb65d50c --- /dev/null +++ b/test/files/pos/t7433.flags @@ -0,0 +1 @@ +-Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t7433.scala b/test/files/pos/t7433.scala new file mode 100644 index 0000000000..f2109f4afa --- /dev/null +++ b/test/files/pos/t7433.scala @@ -0,0 +1,10 @@ +object Test { + def foo() { + try { + for (i <- 1 until 5) return + } catch { + case _: NullPointerException | _: RuntimeException => + // was: "catch block may intercept non-local return from method check" + } + } +} diff --git a/test/files/pos/t7584.scala b/test/files/pos/t7584.scala new file mode 100644 index 0000000000..52d127ecb9 --- /dev/null +++ b/test/files/pos/t7584.scala @@ -0,0 +1,11 @@ +object Test { + def fold[A, B](f: (A, => B) => B) = ??? + def f[A, B](x: A, y: B): B = ??? + def bip[A, B] = fold[A, B]((x, y) => f(x, y)) + def bop[A, B] = fold[A, B](f) + + // these work: + fold[Int, Int]((x, y) => f(x, y)) + fold[Int, Int](f) +} + |